  The Ftape Installation and Usage Guide
  Claus-Justus Heine (heine@instmath.rwth-aachen.de)


  This document describes basic usage and installation of the floppy
  tape device driver _f_t_a_p_e for Linux.  This document applies to version
  4.04 of the _f_t_a_p_e device driver.
  ______________________________________________________________________

  Table of Contents
























































  1. GNU GENERAL PUBLIC LICENSE

     1.1 Preamble
     1.2 How to Apply These Terms to Your New Programs

  2. Introduction

  3. Submitting bug and problem reports

  4. Ways to get access to the documentation

     4.1 Sources of documentation
     4.2 The HTML version of the manual
     4.3 The Info version of the manual
     4.4 The Postscript version of the manual, hard-copies
     4.5 TeXinfo, rebuilding the documentation from source

  5. Quick Installation Guide

  6. Installation

     6.1 Requirements
        6.1.1 The floppy tape driver distribution
        6.1.2 The kernel sources for Linux v1.2.13 or later
        6.1.3 Utilities for managing kernel modules
        6.1.4 Backup software and related programs
        6.1.5 Utilities designed for
        6.1.6 Kernel Log Daemons
        6.1.7 A floppy tape drive
        6.1.8 Plug and Pray (PnP) Utilities
        6.1.9 Optional: really
     6.2 Kernel Patches
        6.2.1 Installation under prehistoric kernels
        6.2.2 Installation under Linux v1.2.13
           6.2.2.1 Patching 1.2.13
           6.2.2.2 Changing 1.2.13 by hand
        6.2.3 Installation under Linux-2.0.0 and up
     6.3 Compiling
        6.3.1 FDC_OPT, setting up for your hardware
        6.3.2 CONFIG_MODVERSIONS, versioned symbols
        6.3.3 BROKEN_FLOPPY_DRIVER
        6.3.4 CONFIG_FT_PROC_FS,
        6.3.5 TRACE_FLAGS, debugging output
     6.4 Installing the kernel modules and utilities
     6.5 Un-installing

  7. Loading the Kernel Modules

     7.1 Which modules are needed?
     7.2 Module auto-loading
     7.3 Load time configuration
        7.3.1 (TT
        7.3.2 zftape.o
        7.3.3 zft-compressor.o
        7.3.4 ftape-internal.o
        7.3.5 trakker.o bpck-fdc.o
        7.3.6 All FDC driver modules
     7.4 Inserting the
        7.4.1 Modifying
           7.4.1.1 Prepare for module auto-loading
           7.4.1.2 FDC drivers specification in
           7.4.1.3 FDC driver options in
           7.4.1.4 Automated memory de-fragmentation with
           7.4.1.5 Complete examples for
        7.4.2 Using the kernel's module auto-loading mechanism
        7.4.3 Loading the driver with modprobe
  8. Testing the driver

     8.1 Useful utilities for
        8.1.1 Swapout, the memory de-fragmentation utility
        8.1.2 The tape control program
        8.1.3 The volume table manipulation program
        8.1.4 The floppy tape cartridge formatter
     8.2 Avoiding super user privileges
     8.3 Performing sample backups
     8.4 Other test runs
     8.5 (EM
     8.6 Output of
     8.7 Syslog example when accessing tape the first time

  9. VFS Interface and Implementation Notes

     9.1 Devices provided by
        9.1.1 Device naming with the
        9.1.2 Rewinding and non-rewinding devices
           9.1.2.1 Updating of header segments
           9.1.2.2 Tape motion commands
        9.1.3 The meaning of the digit suffix (drive selection)
        9.1.4 Devices provided by
           9.1.4.1 Table of devices
           9.1.4.2 Overview
           9.1.4.3 (TT
           9.1.4.4 (TT
           9.1.4.5 (TT
           9.1.4.6 (TT
     9.2 Compatibility with
        9.2.1 Read only support for
        9.2.2 Changed
     9.3 Compatibility with
     9.4 Compatibility with
        9.4.1 Tape block addressing
        9.4.2 Raw access mode
     9.5 File marks
        9.5.1 File mark implementation with
        9.5.2 File mark implementation with
        9.5.3 File marks and
     9.6 Tape blocks
     9.7 Builtin Compression
     9.8 The ioctl interface to
        9.8.1 The tape operation wrapper ioctl
           9.8.1.1 MTRESET
           9.8.1.2 MTFSF
           9.8.1.3 MTBSF
           9.8.1.4 MTFSR
           9.8.1.5 MTBSR
           9.8.1.6 MTWEOF
           9.8.1.7 MTREW
           9.8.1.8 MTOFFL
           9.8.1.9 MTNOP
           9.8.1.10 MTRETEN
           9.8.1.11 MTBSFM
           9.8.1.12 MTFSFM
           9.8.1.13 MTEOM
           9.8.1.14 MTERASE
           9.8.1.15 MTSETBLK
           9.8.1.16 MTSETDENSITY
           9.8.1.17 MTSEEK
           9.8.1.18 MTTELL
           9.8.1.19 MTSETDRVBUFFER
           9.8.1.20 MTLOCK
           9.8.1.21 MTUNLOCK
           9.8.1.22 MTLOAD
           9.8.1.23 MTUNLOAD
           9.8.1.24 MTCOMPRESSION
           9.8.1.25 MTSETPART
        9.8.2 (TT
        9.8.3 (TT
        9.8.4 MTIOCRDFTSEG, reading arbitrary floppy tape segments
        9.8.5 MTIOCVOLINFO
        9.8.6 MTIOCGETSIZE
        9.8.7 Formatting of cartridges using
           9.8.7.1 Differences between
           9.8.7.2 The
           9.8.7.3 (TT
           9.8.7.4 (TT
           9.8.7.5 (TT
           9.8.7.6 (TT
           9.8.7.7 (TT
        9.8.8 Sending raw
        9.8.9 Switching between raw and regular mode

  10. Concept Index

     10.1 /
     10.2 1
     10.3 2
     10.4 A
     10.5 B
     10.6 C
     10.7 D
     10.8 E
     10.9 F
     10.10 G
     10.11 H
     10.12 I
     10.13 K
     10.14 L
     10.15 M
     10.16 N
     10.17 O
     10.18 P
     10.19 Q
     10.20 R
     10.21 S
     10.22 T
     10.23 U
     10.24 V
     10.25 W
     10.26 Z


  ______________________________________________________________________




       Copyright (C) 21 July 2000 Claus-Justus Heine
       (heine@instmath.rwth-aachen.de)

       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 manual under the conditions for verbatim
       copying, provided also that the sections entitled
       ``Copying'' and ``GNU General Public License'' (see ``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 this
  permission notice may be stated in a translation approved by
  the Free Software Foundation.





  11..  GGNNUU GGEENNEERRAALL PPUUBBLLIICC LLIICCEENNSSEE

  Version 2, 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.




  11..11..  PPrreeaammbbllee

  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


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


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


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


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


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

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

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

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


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

  10.

     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.


  11.

     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

  12.

     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.

  13.

     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

  11..22..  HHooww ttoo AAppppllyy TThheessee TTeerrmmss ttoo YYoouurr NNeeww PPrrooggrraammss

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


  22..  IInnttrroodduuccttiioonn

  This is only one of several sources of documentation for the _f_t_a_p_e
  driver. You may want to read the Ftape-HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Ftape-HOWTO.html>
  (http://sunsite.unc.edu/LDP/HOWTO/Ftape-HOWTO.html) as well as the
  Ftape FAQ <http://www.correct.nl/~ftape>.
  (http://www.correct.nl/~ftape) The ftape-tools package comes with it
  own manual. See Top (info file ftape-tools).


  If you have installed _t_h_i_s package (The Ftape Installation and Usage
  Guide) locally as part of the The Ftape Manual distribution, then
  both, the Ftape-FAQ as the Ftape-HOWTO, are installed locally on your
  computer as well. In this case, hypertext references in this document
  refer to the locally installed versions instead of the the locations
  given above which might be more recent. The locally installed versions
  are dated 21 July 2000.


  The _f_t_a_p_e packages are available from either the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>


  or from


  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/.


  Development versions and beta releases are available from the Ftape
  home page <http://www.instmath.rwth-aachen.de/~heine/ftape> only.


  _f_t_a_p_e is a driver for tape drives that connect to the floppy
  controller of your computer. There are also special floppy tape
  controllers that operate at a higher speed. But these are (more or
  less) floppy disk controllers that are located at a hardware address
  different from the one used by the standard floppy disk controller.
  Some (all?) of those high speed controllers are supported by _f_t_a_p_e,
  namely




     Colorado CMS FC-10/FC-20

        The Colorado CMS FC-20 controller is supported at _1_M_b_p_s _o_n_l_y.


     Mountain Mach-II


     Intel 82078 based floppy disk controllers


        This includes (but isn't limited to)



     +o  Exabyte's high speed controller.

     +o  Seagate's (resp. Conner (-- Conner was taken over by Seagate
        some time ago--)

        ) CTC-2Mb 2Mb Floppy Controller

     +o  Iomega's Ditto Dash Controller



     Iomega Ditto EZ 4Mbps controller

        This is a so called _P_n_p (Plug and Pray, ehem, Play) extension
        card. Linux supports the ISA PnP stuff since one of the 2.3.x
        versions. Earlier versions of Linux need sp special utilities to
        configure PnP card. E.g. the isapnptools package from the ISA
        PnP Tools Page <http://www.roestock.demon.co.uk/isapnptools/>.


  Rating specifications of those controllers (i.e. 4Mb, 2Mb, 1Mb) are to
  be understood as Bits Per Second NNOOTT Bytes Per Second


  Besides tape drives connecting to those internal FDC controllers _f_t_a_p_e
  also supports certain kinds of floppy tape drives that connect to the
  parallel port, namely




     The Colorado Trakker parallel port drive

        Support for this drive was added by Jochen Hoenicke.



     Micro Solutions Backpack parallel port floppy tape drives

        At least the Iomega Ditto product line is supported. Some
        Exabyte parallel port tape drives -- which in principle also
        have an interface made by Micro Solutions -- are reported to
        have problems.


  Please refer to the


  Ftape-HOWTO </usr/local/share/ftape-howto/html/ftape-howto.html> (--
  See http://sunsite.unc.edu/LDP/HOWTO/Ftape-HOWTO.html for a more
  recent version.--)



  for a more detailed listing of supported hardware.


  _f_t_a_p_e runs under Linux-1.2.13, and Linux-2.0.* up to Linux-2.4.*.
  Under Linux-2.* it can be used on Intel-x86 machines and on DEC Alpha
  machines. Ftape probably will not work with Linux-1.2.13 and DEC
  Alpha, but only with Intel-x86.


  If you intend to use _f_t_a_p_e with another platform, then I suggest that
  you try it. And drop me (Claus-Justus Heine (heine@instmath.rwth-
  aachen.de)) a note, I'm really curious if it works.


  You may want to read through the file


  [/usr/src/ftape-4.04/]RELEASE-NOTES <RELEASE-NOTES>


  for a short revision history of _f_t_a_p_e.


  What _f_t_a_p_e is _n_o_t:



  +o  _f_t_a_p_e is nnoott a driver for so called QIC-02, QIC-24 or QIC-150 tape
     drives. Use


     [/usr/src/linux/]drivers/char/tpqic02.c
     instead.

  +o  _f_t_a_p_e is nnoott a driver for SCSI tapes. Have a look at


     [/usr/src/linux/]drivers/scsi/st.c


     instead.


  +o  _f_t_a_p_e is nnoott a driver for ATAPI (ide) tapes. Use


     [/usr/src/linux/]drivers/block/ide-tape.c


     instead.


  See the Ftape-HOWTO </usr/local/share/ftape-howto/html/ftape-
  howto.html> (-- See http://sunsite.unc.edu/LDP/HOWTO/Ftape-HOWTO.html
  for a more recent version.--)

  for a more complete list of supported hardware.


  33..  SSuubbmmiittttiinngg bbuugg aanndd pprroobblleemm rreeppoorrttss

  Make sure that you have read the


  Ftape-FAQ </usr/local/share/ftape-faq/html/ftape-faq.html> (-- See
  http://www.correct.nl/~ftape for a more recent version.--) (-- _F_A_Q is
  an abbreviation for Frequently Asked Questions.--)



  before repeating frequently asked questions. Note also that _t_h_i_s
  documentation (i.e. the document you are reading right now) has an
  index (see ``Concept Index'') consisting of hyper-links to the proper
  locations in this manual.


  Please make also sure that you have read the file
  [/usr/src/ftape-4.04/]BUGS <BUGS> before reporting bugs already known.


  If you email me, please include the string ftape in the subject line.
  This will help ensure the mail doesn't inadvertently get buried and
  helps my email filters to move it to the correct folder.


  PPlleeaassee include aatt lleeaasstt tthhee ffoolllloowwiinngg iinnffoorrmmaattiioonn wwiitthh yyoouurr bbuugg
  rreeppoorrttss::



  +o  the version of _f_t_a_p_e you are using.

  +o  the version of the kernel you are using.

  +o  the kind of hardware you are using, especially the type of your
     tape drive, and perhaps which type of tape cartridges you used.


  +o  if eevveerr possible, a command sequence that reproduces the erroneous
     or irritating behaviour of _f_t_a_p_e. Please don't limit your bug
     report to a mere description of what you were doing but include
     also brief and clear instructions how to reproduce the error if
     possible.

  +o  when posting excerpts of your kernel log file (see ``Kernel log
     daemons'') then please tell me also under what circumstances these
     messages were produced, i.e. tell me what commands you used to
     access the tape just before the driver dumped those debugging
     messages to the system's kernel log files.


  You can contact me directly under


  Claus-Justus Heine (heine@instmath.rwth-aachen.de)


  but you should consider to post to the Linux tape mailing list
  instead. To do this, direct your messages to linux-
  tape@vger.rutgers.edu. To read the mailing list, you can subscribe to
  it by sending mail to majordomo@vger.rutgers.edu with the line




       subscribe linux-tape




  in the message bbooddyy. After having successfully subscribed to the
  mailing list you will receive a short message from the mailing list
  daemon at majordomo@vger.rutgers.edu which instructs you how to
  _u_n_s_u_b_s_c_r_i_b_e. PPlleeaassee ssttoorree tthheessee iinnssttrruuccttiioonnss iinn aa ssaaffee ppllaaccee. Pleas
  note that I am NNOOTT the maintainer of the mailing list. I can't
  unsubscribe or subscribe you to the mailing list.


  The advantage of using the mailing list over contacting me directly is
  that it offers contacts to other people who share your problems and/or
  can give better advice than I'm able to give you. Please keep in mind
  that I most probably don't have direct access the hardware you are
  using. And, well, I wrote parts of the driver and have heavily
  modified most of it. I know how _f_t_a_p_e behaves. And this means that I
  might have lost the ability to understand some of your problems.  I'm
  reading the list regularly; your message will reach me.


  However, when sending large emails that aren't of general interest
  (e.g. large excerpts from your system log files) then please don't use
  the mailing list but send them directly to me (Claus-Justus Heine
  (heine@instmath.rwth-aachen.de)). People might have to pay for their
  Internet connection ...


  You might experience that you don't get an immediate answer to private
  email or a posting to the mailing list or don't get an answer at all.
  Please don't become angry. Simply resend your question or comment
  after a reasonable amount of time (say a week or so). Please use the
  mailing list if ever possible.




  44..  WWaayyss ttoo ggeett aacccceessss ttoo tthhee ddooccuummeennttaattiioonn

  44..11..  SSoouurrcceess ooff ddooccuummeennttaattiioonn



     _T_h_e _F_t_a_p_e _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _U_s_a_g_e _G_u_i_d_e

        This is the document you are reading right now. Recent versions
        are included with each _f_t_a_p_e distributions. You can view it
        online at the


        Ftape home page <http://www.instmath.rwth-
        aachen.de/~heine/ftape>.


        The Ftape Installation and Usage Guide is rather a general _f_t_a_p_e
        manual than a mere installation guide.



     _F_t_a_p_e_-_F_A_Q

        The


        Ftape-FAQ </usr/local/share/ftape-faq/html/ftape-faq.html> (--
        See http://www.correct.nl/~ftape for a more recent version.--)

        .


        is a collection of Frequently Asked Questions (_F_A_Q). It is
        maintained by Johan De Wit (jo@correct.nl).



     BUGS

        This is a short list of known [/usr/src/ftape-4.04/]BUGS <BUGS>.



     Ftape-HOWTO

        The


        Ftape-HOWTO </usr/local/share/ftape-howto/html/ftape-howto.html>
        (-- See http://sunsite.unc.edu/LDP/HOWTO/Ftape-HOWTO.html for a
        more recent version.--)



        is maintained by Claus-Justus Heine (heine@instmath.rwth-
        aachen.de).



     _Q_I_C _D_e_v_e_l_o_p_m_e_n_t _S_t_a_n_d_a_r_d_s

        _Q_I_C development standards can be found at the QIC organisations
        home page <http://www.qic.org> where you can get the latest
        standards in _P_D_F format.

     _T_h_e _L_i_n_u_x _T_a_p_e _M_a_i_l_i_n_g _L_i_s_t

        And, of course, there is the


        Linux Tape Mailing List (linux-tape@vger.rutgers.edu)


        as a discussion forum. (But please read my remarks about
        submitting bug reports, see ``Reporting bugs'').


  44..22..  TThhee HHTTMMLL vveerrssiioonn ooff tthhee mmaannuuaall

  The The Ftape Installation and Usage Guide is available in HTML
  format. It can be viewed online at the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>


  were you can also download the latest version from the manual for
  local installation. This manual is available from
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/ as well.


  If you have installed the The Ftape Installation and Usage Guide
  locally in its default place /usr/local/share/ftape-manual/ then the
  entry point to the HTML version of the manual is




       <tt>[/usr/local/]share/ftape-manual/html/index.html</tt>




  which you can load into your favourite html viewer.  Examples (to be
  typed in at the shell prompt):



  +o  netscape:




       netscape http://localhost/usr/local/share/ftape-manual/html/index.html




  +o  lynx (-- currently, the html version of the manual looks better
     when viewed with a web browser that has support for tables which
     lynx has _n_o_t--)

     :




       lynx /usr/local/share/ftape-manual/html/index.html



  44..33..  TThhee IInnffoo vveerrssiioonn ooff tthhee mmaannuuaall

  In case you have installed the The Ftape Installation and Usage Guide
  locally in its default place using the default prefix /usr/local/ then
  it should be possible to view the INFO version of the manual with
  default methods i.e. with emacs or xemacs or the info program or even
  with an HTML browser if you have installed an INFO to HTML cgi script
  which automatically translates INFO pages to HTML pages.


  In any case there should be an entry like follows in the global INFO
  file directory:




       The Linux Operating System
       * Ftape-4.x: (ftape-4).       The Floppy Tape Driver for Linux, version 4.




  44..44..  TThhee PPoossttssccrriipptt vveerrssiioonn ooff tthhee mmaannuuaall,, hhaarrdd--ccooppiieess

  In case you have installed the The Ftape Installation and Usage Guide
  locally in its default place /usr/local/share/ftape-manual/ then the
  Postscript version of the manual is




       <tt>/usr/local/share/ftape-manual/ftape-4.ps</tt>




  You can print this file the normal way a Postscript document is
  printed with your setup.


  44..55..  TTeeXXiinnffoo,, rreebbuuiillddiinngg tthhee ddooccuummeennttaattiioonn ffrroomm ssoouurrccee

  The The Ftape Installation and Usage Guide package comes with pre-
  formatted documentation. You may have difficulties to format the
  documentation yourself.  I have used the following utilities:




     makeinfo (GNU texinfo 3.12) 1.68


     sgml-tools-1.0.7


     perl, version 5.004_04


     TeX, Version 3.14159 (C version 6.1)


     LaTeX2e

  If you configure and build the The Ftape Installation and Usage Guide
  package with the commands

       configure
       make




  then almost nothing will happen as the package already contains all
  necessary formatted versions of the manual.


  55..  QQuuiicckk IInnssttaallllaattiioonn GGuuiiddee

  Please read through the chapter Installation, (see ``Installation'')
  if you don't arrive at installing _f_t_a_p_e with this Quick Installation
  chapter.



       You don't need to install this version of _f_t_a_p_e if you are
       running Linux version v2.2 or higher because _f_t_a_p_e_-_4_._0_4 is
       already included in the kernel source tree.  The kernel con-
       figuration menu will give you on-line help while configuring
       the _f_t_a_p_e driver.



       Maybe you still want to read some passages of the Require-
       ments section of the Installation chapter. See ``Require-
       ments''.



       But otherwise you can ignore this chapter, as well as the
       next chapter (see ``Installation'') get the ftape-tools
       package from the Ftape home page <http://www.instmath.rwth-
       aachen.de/~heine/ftape> or from ftp://sun-
       site.unc.edu/pub/Linux/kernel/tapes/ and proceed directly to
       the chapter that deals with testing the driver (see ``Test-
       ing ftape'').


  You may also want to consult the


  Ftape-FAQ </usr/local/share/ftape-faq/html/ftape-faq.html> (-- See
  http://www.correct.nl/~ftape for a more recent version.--)



  and the file [/usr/src/ftape-4.04/]BUGS <BUGS> of the _f_t_a_p_e
  distribution if something went wrong.


  If you are running a pre-2.0.0 Linux  (-- You can determine the
  version of the running kernel with the command uname -r or by
  examining the file /proc/version. The version of the kernel sources
  under /usr/src/linux/ can be determined by examining the file
  /usr/src/linux/include/linux/version.h.--)

  then you are out of luck. Please read the Chapter Installation. See
  ``Installation''.


  Otherwise, try to proceed as follows:


  +o  If the kernel you are using was compiled wwiitthh support for _f_t_a_p_e
     then you need to reconfigure your kernel wwiitthhoouutt support for _f_t_a_p_e
     and recompile and install it.

  +o  edit the file [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> to reflect
     your hardware settings. Normally you only need to change the
     settings of the FDC_OPT make variable. If you don't have a kernel
     source tree installed (normally under /usr/src/linux/) then you
     will need to set some other options manually. The options in
     question start with CONFIG_.... Please follow the instruction in
     the file [/usr/src/ftape-4.04/]MCONFIG <MCONFIG>.


     Almost all option settings in [/usr/src/ftape-4.04/]MCONFIG
     <MCONFIG> specify the default settings oonnllyy and the corresponding
     options can be changed at module load time.  See ``Inserting the
     <em>ftape</em> modules into the kernel''.


     If you do have a kernel source tree then please make sure that you
     have configured it correctly. The configuration of the kernel
     sources should match the configuration of the kernel you intend to
     use _f_t_a_p_e with. In this case _f_t_a_p_e will use the configuration
     options of the kernel and figure out the proper values of the
     CONFIG_... options itself.


  +o  compile the driver with the command




       make




  in the top directory of the _f_t_a_p_e source tree. By this, I mean:



       Assume you have downloaded ftape-4.04.tar.gz into MYFUNNYDI-
       RECTORY and do a






       cd MYFUNNYDIRECTORY
       tar -xzf ftape-4.04.tar.gz






       then you have to do








  cd ftape-4.04
  make








  +o  If you get error messages like




       ftape_syms.c:60: macro `_basic_version' used with just one arg




  during compilation then you have enabled the CONFIG_MODVERSIONS flag
  in the file [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> and are using a
  kernel without support for so called versioned symbols. This doesn't
  work. Edit MCONFIG and disable the CONFIG_MODVERSIONS switch (see
  ``CONFIG_MODVERSIONS'').


  +o  install the _f_t_a_p_e modules and create the _f_t_a_p_e devices by (see
     ``Installing ftape'')




       make install




  You need to be root for the latter (i.e. do su ; make install).


  +o  In case that you have configured _f_t_a_p_e using the
     [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> file correctly, then run
     the following commands on the shell prompt for giving it a quick
     test:




       modprobe zftape
       modprobe ftape-internal
       modprobe trakker
       modprobe bpck-fdc




  This will load the five modules ftape.o, zftape.o, ftape-internal.o,
  trakker.o and bpck-fdc.o.  You can use some standard Un*x commands to
  test the driver (e.g. mt or tar, see ``Testing ftape'').


  If it isn't that easy, maybe because of a bug in the _f_t_a_p_e driver
  ([/usr/src/ftape-4.04/]BUGS <BUGS>), then please have a look at the
  file [/usr/src/ftape-4.04/]modules/insert <insert>

  +o  See ``Loading ftape'', for information on how to load the driver in
     a more clever way. See ``Testing ftape'' for information about how
     to test it. See ``Tape blocks'' for some notes about some iimmppoorrttaanntt
     differences between _f_t_a_p_e_-_4_._0_4 and previous versions of the _f_t_a_p_e.

  +o  If you get error messages about undefined symbols when trying to
     load the module, then you either use an old version of the modutils
     package (see ``Requirements'') or you are using a kernel of the
     2.1.*  series configured to use versioned symbols and didn't enable
     the CONFIG_MODVERSIONS flag in the file
     [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> (or vice versa). Check your
     kernel configuration and edit MCONFIG appropriately.

  +o  To delete all the .o files type in (at the shell prompt)




       make clean




  If you want to remove eevveerryytthhiinngg except the sources then you have to
  run




       make realclean




  +o  To uninstall the driver run




       make uninstall




  However, this will not delete the device nodes in /dev/.


  66..  IInnssttaallllaattiioonn

  66..11..  RReeqquuiirreemmeennttss

  66..11..11..  TThhee ffllooppppyy ttaappee ddrriivveerr ddiissttrriibbuuttiioonn ffttaappee--44..0044..ttaarr..ggzz

  Final releases of the distribution can be found at


  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/


  You can also down-load the package from the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>.



  The latter node has also some other links to floppy tape related
  information and might contain older versions of the _f_t_a_p_e package as
  well as recent development versions.  If you can't access this page at
  all then please try again some hours later. If this doesn't work then
  please drop me a short (and kind) note stating that the page appears
  to be down for hours. I'll see what I can do about it.


  See ``Compiling ftape'', for information on configuring and compiling
  the driver.


  66..11..22..  TThhee kkeerrnneell ssoouurrcceess ffoorr LLiinnuuxx vv11..22..1133 oorr llaatteerr

  Actually _f_t_a_p_e_-_4_._0_4 hasn't been tested yet with Linux v1.2.13, but
  only with v2.1.x and later. If you know what you're doing then you can
  use the driver with older kernel versions, but you have to hack the
  _f_t_a_p_e and modules support in the kernel yourself!


  You need to run a kernel wwiitthhoouutt support for _f_t_a_p_e compiled into the
  kernel image. Please check the file /proc/devices for a line like 27
  ft. If /proc/devices contains such a line (-- Of course, the _f_t_a_p_e
  device in /proc/devices will also show up if any version of the ftape
  _m_o_d_u_l_e is loaded.--)

  , then you need to reconfigure your kernel wwiitthhoouutt support for _f_t_a_p_e
  enabled, i.e. answer nnoo to the




       Ftape (QIC-80/Travan) support




  question. Recompile and install the new kernel in the usual way.


  Note that there were quite a bit of problem reports on compiling _f_t_a_p_e
  with kernels of the 1.2.* series. However, some of these should vanish
  when compiling the drivers without the CONFIG_MODVERSIONS option.
  Other problems may vanish when reading through the special parts of
  this manual that are dedicated to those kernels (see ``v1.2.13'').  I
  arrived at compiling _f_t_a_p_e with the following kernels:



  +o  v1.2.13 (see ``v1.2.13'').

  +o  All of the 2.0.* series up to 2.0.31. See ``v2.x.x''.

  +o  All of the 2.1.* series up to 2.1.115. See ``v2.x.x''.


  66..11..33..  UUttiilliittiieess ffoorr mmaannaaggiinngg kkeerrnneell mmoodduulleess

  The latest kernel contains the following in
  /usr/src/linux/Documentation/Changes:






  Modules utilities
  =================
  The 2.3.10 release:
  ftp://ftp.ocs.com.au/pub/modutils/v2.3/modutils-2.3.10.tar.gz




  There is no need to install a new version of the modules utilities if
  the version installed on you system works well for you.


  66..11..44..  BBaacckkuupp ssooffttwwaarree aanndd rreellaatteedd pprrooggrraammss

  Tools like mt and tar to use the driver (these can be found in the GNU
  cpio and tar packages).  There are also various other backup packages
  that might be useful. Some of them can be found at


  ftp://sunsite.unc.edu/pub/Linux/system/backup/


  The Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  also contains links to several backup programs in its Software
  chapter.


  66..11..55..  UUttiilliittiieess ddeessiiggnneedd ffoorr ffttaappee

  There is a special version of the GNU mt program (see ``mt'') as well
  as other utilities in the ftape-tools package that can be downloaded
  from the same locations as the _f_t_a_p_e package, i.e. either from


  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/


  or the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>. See
  Top (info file ftape-tools).


  See ``File System Interface''). There is also a bit of information
  about the use of the mt program in this manual (see ``Ioctls'').


  66..11..66..  KKeerrnneell LLoogg DDaaeemmoonnss

  You may want to capture the debug messages that _f_t_a_p_e produces with a
  suitable program that logs kernel messages to a file.


  There exist various programs that perform this task. If you have got
  your Linux from a CD distribution, then you most probably don't need
  to worry about this. The kernel log files can often be found in the
  /var/log/ or /var/adm/ directories.


  The package I am using for this purpose is sysklogd-1.3.tar.gz. It
  contains two programs, syslogd (normal syslog daemon) and klogd (the
  kernel log daemon). Please refer to the install guide of that package.



  66..11..77..  AA ffllooppppyy ttaappee ddrriivvee

  Of course, you also need a tape drive installed and the appropriate
  tools to compile the sources (i.e. a recent binutils package and gcc).


  66..11..88..  PPlluugg aanndd PPrraayy ((PPnnPP)) UUttiilliittiieess

  When using _f_t_a_p_e_-_4_._0_4 with Linux-2.3.* and up then there is no need to
  get special utilities for PnP cards as those cards are detected and
  configured by the kernel and the ftape driver.


  Otherwise you should also get the isapnptools package which has a www
  page at http://www.roestock.demon.co.uk/isapnptools/. plug'n play
  cards are those controller cards that cannot be configured by setting
  jumpers.


  66..11..99..  OOppttiioonnaall:: rreeaallllyy rreecceenntt  ddooccuummeennttaattiioonn ffoorrmmaattttiinngg ttoooollss

  It shouldn't be necessary to rebuild the pre-formatted versions of
  this manual (i.e. the thing you are reading _r_i_g_h_t _n_o_w). However, if
  you need or want to rebuild either the info, dvi or HTML version of
  the manual then you rreeaallllyy nneeeedd




     texinfo-3.12 (or later)

        to rebuild either the info or the dvi version.



     perl-5.004

        to rebuild the HTML and SGML version of the manual.



     sgml-tools-1.0.7

        to create play with the SGML version of the manual. The SGML
        version is automatically produced from the TeXinfo version with
        a perl script.


  66..22..  KKeerrnneell PPaattcchheess

  This section describes the peculiarities of the _f_t_a_p_e installation
  that occur when installing it under certain kernel versions. Basically
  this section describes how to patch the kernel to make it possible to
  use _f_t_a_p_e with it. You normally don't need to worry about this issue
  when running a 2.0.* kernel or above.


  66..22..11..  IInnssttaallllaattiioonn uunnddeerr pprreehhiissttoorriicc kkeerrnneellss

  If running pre-1.2.* kernels, you are probably out of luck with _f_t_a_p_e.
  You will have to upgrade to a newer kernel first. Linux kernels can be
  found, for example, at the location


  ftp://ftp.funet.fi/pub/Linux/kernel/linux/

  or at


  http://www.kernel.org/


  These nodes contain subdirectories named like v2.0/ or v1.2/ that
  contain the source code for the respective kernel versions. Please
  read also always the file README in those subdirectories.


  66..22..22..  IInnssttaallllaattiioonn uunnddeerr LLiinnuuxx vv11..22..1133

  This subsection describes how to modify the sources of the Linux
  v1.2.13 kernel to enable use of _f_t_a_p_e with this kernel version. Please
  note that _f_t_a_p_e probably won't work with kernel version 1.2.13 and DEC
  Alpha machines (-- Is this still true? I have remove ALL machine
  dependent timing code from _f_t_a_p_e. So it may work with all
  architectures as well. Or not. FIXME--)

  .


  Please follow the steps described below. I assume that your kernel
  source tree starts at /usr/src/linux/ and that the _f_t_a_p_e distribution
  lives in /usr/src/ftape-4.04/.  It is necessary to modify the kernel
  for two reasons:



  1.  _f_t_a_p_e needs to allocate dma memory dynamically and Linux v1.2.13
     does not export the following symbols for use with kernel modules:




     _____g_e_t___d_m_a___p_a_g_e_s


     _i_n_t_r___c_o_u_n_t

     Thus one needs to modify




       /usr/src/linux/kernel/ksyms.c




  2.  _f_t_a_p_e needs the macro _v_i_r_t___t_o___b_u_s, so one needs to change the file




       /usr/src/linux/include/asm-i386/io.h




  The old io.h may also cause trouble with newer GNU C-compilers
  (gcc-2.7.0 and up, if so).



  3.  _f_t_a_p_e needs some macros defined in the ./include/linux/wrappers.h
     included in newer kernel versions (post 1.2.13). This file doesn't
     exist in 1.2.13 and hence the macros are missing (and the compiler
     will complain that it can't find this include file).


  Now, please use the following steps to modify the kernel:



  1.  Change to the top of your kernel source tree:




       cd /usr/src/linux/




  2.  Modify the kernel sources such that _f_t_a_p_e can be used with Linux
     v1.2.13.  There are two possibilities for changing the kernel
     sources, these are:


     Patching 1.2.13. See ``Patching 1.2.13''.


     Changing 1.2.13 by hand. See ``Changing 1.2.13 by hand''.


  3.  Recompile your kernel with the following steps:




       make clean
       make dep
       make zlilo
       make modules
       make modules_install




  You may need to replace make zlilo by the command you need to install
  your kernel such that you can boot it. Alternatives are for example
  make zdisk or make zImage. The latter does only compile the kernel and
  does not install the kernel image.


  PPlleeaassee ddoonn''tt ffoorrggeett tthhee make dep.


  So this is it. You should now be able to compile the _f_t_a_p_e_-_4_._0_4
  package with Linux v1.2.13 (see ``Compiling ftape'').


  However, there were numerous problem reports for installing _f_t_a_p_e and
  _z_f_t_a_p_e versions under Linux v1.2.x. The problems most often
  encountered are:



  +o  insmod can't resolve symbols. If you get messages like
     .gcc2-compiled undefined you may solve the problem with doing the
     following:




       ld -x -r ftape.o
       mv -f a.out ftape.o




  Of course, you need also to do this with all other modules:




     zftape.o


     zft-compressor.o


     ftape-internal.o


     trakker.o


     bpck-fdc.o

  +o  gcc can't find certain files during the compilation of _f_t_a_p_e. The
     files most often `missing' are




       /usr/src/linux/include/linux/version.h




  or




       /usr/src/linux/include/linux/modversions.h.




  If the latter occurs, you probably forgot that make dep or configured
  the versioned symbols stuff with _f_t_a_p_e wrongly.  (see
  ``CONFIG_MODVERSIONS'').


  66..22..22..11..  PPaattcchhiinngg 11..22..1133

  I assume that you use an unmodified kernel source tree. However, if
  you use heavily modified kernel sources, it is still possible to
  change them for _f_t_a_p_e with little effort (see ``Changing 1.2.13 by
  hand'').  You have already changed to the directory /usr/src/linux/
  which contains the kernel sources. Now do the following:



       patch -p1 < /usr/src/ftape-4.04/patches/v1.2/linux-1.2.13.dif
       patch -p1 < /usr/src/ftape-4.04/patches/v1.2/linux-1.2.13.dif.2




  If this succeeds, then there should be three new files, namely




       ./kernel/ksyms.c.orig
       ./include/asm-i386/io.h.orig
       ./include/linux/wrapper.h




  which are the original versions of the files without the .orig suffix.
  If you find files with a .rej suffix then the patch command failed. In
  this case please do




       mv -f ./kernel/ksyms.c.orig ./kernel/ksyms.c
       mv -f ./include/asm-i386/io.h.orig ./include/asm-i386/io.h
       rm -f ./include/asm-i386/io.h.rej
       rm -f ./kernel/ksyms.c.rej
       rm -f ./include/linux/wrapper.h*




  and then proceed to the next section (see ``Changing 1.2.13 by
  hand'').


  66..22..22..22..  CChhaannggiinngg 11..22..1133 bbyy hhaanndd

  You have already changed to the directory /usr/src/linux/ which
  contains the kernel sources. You only need to do the following:



  1.  Replace the file ./include/asm-i386/io.h with the one that comes
     with ftape-4.04:




       mv ./include/asm-i386/io.h ./include/asm-i386/io.h.old
       cp /usr/src/ftape-4.04/patches/v1.2/io.h ./include/asm-i386/




  2.  Create the file ./include/linux/wrapper.h:




       cp /usr/src/ftape-4.04/patches/v1.2/wrapper.h ./include/linux/



  3.  Edit the file ./kernel/ksyms.c using you favourite text editor.
     You need to add some function and variable declarations and add
     some kernel symbols to the export list. You need to add the
     following declarations:




       extern unsigned long __get_dma_pages(int priority,
                                            unsigned long order);
       extern mem_map_t *mem_map;
       extern int remap_page_range(unsigned long from, unsigned long to,
                                   unsigned long size, pgprot_t prot);




  Please place those lines somewhere at the beginning of the file, where
  you find other lines starting with the keyword extern.


  The symbols to add to the export list are:




               X(__get_dma_pages),
               X(intr_count),




  Please insert the above lines right aafftteerr the line containing the text
  X(register_symtab),.


  You may also want to examine the patch files




       /usr/src/ftape-4.04/patches/v1.2/linux-1.2.13.dif
       /usr/src/ftape-4.04/patches/v1.2/linux-1.2.13.dif.2




  to get an idea how the changed ./kernel/ksyms.c should look like.


  Please don't forget the , and ; characters at the end of the lines as
  indicated in the instructions above.


  66..22..33..  IInnssttaallllaattiioonn uunnddeerr LLiinnuuxx--22..00..00 aanndd uupp

  You don't need to patch the v2.x.x kernels at all to use _f_t_a_p_e but for
  pre-2.1 kernel it might be a good idea to do so. The patch is already
  included in later versions of the v2.1.x kernel (hopefully) and
  certainly isn't needed for Linux v2.2.x and later.


  If you need it, then apply the patch



  [/usr/src/ftape-4.04]/patches/v2.0/floppy.c.dif <floppy.c.dif>


  to the floppy driver like follows:




       cd /usr/src/linux
       patch -p1 < /usr/src/ftape-4.04/patches/v2.0/floppy.c.dif




  The problem with some versions of the floppy driver is that it
  accesses the I/O-ports of the floppy controller without checking
  whether they are in use. The patch contained in the _f_t_a_p_e package
  changes the floppy driver to protect the I/O-port access by calls to
  check_region() which is the proper way to avoid such kind of
  conflicts. As a result, the floppy driver (when compiled as a module)
  will fail to load while your floppy tape is in use but will not
  disturb the operation of the tape drive.


  Also, the floppy driver contained in Linux v2.0.x (at least until
  v2.0.35) grabs the floppy controller IO ports when loading and doesn't
  release them back to the system even when the floppy isn't used.


  66..33..  CCoommppiilliinngg ffttaappee ,, ccoommppiillee ttiimmee ccoonnffiigguurraattiioonn

  Please change to the top of the _f_t_a_p_e3 source tree, e.g.




       cd /usr/src/ftape-4.04




  Then you have to change or set some variables in the file
  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG>.


  There are explanations in that file for each variable that can be set.
  Some important variables are the following:



       _I_f _y_o_u _h_a_v_e _t_h_e _k_e_r_n_e_l _s_o_u_r_c_e_s _i_n_s_t_a_l_l_e_d _(_n_o_r_m_a_l_l_y _u_n_d_e_r
       /usr/src/linux/) then _f_t_a_p_e will determine itself if it is
       possible to use versioned symbols (see ``CONFIG_MODVER-
       SIONS'') and use the configuration options found in the file
       /usr/src/linux/.config to set some other options correctly.
       Otherwise you will have to set the options starting with
       CONFIG_... yourself. They are close to the beginning of the
       file [/usr/src/ftape-4.04/]MCONFIG <MCONFIG>.


  Now you are ready (finally) and can just type





  make




  This will (besides others) create the following files:




     ./ftape/lowlevel/ftape.o

        the floppy tape driver library module.



     ./ftape/zftape/zftape.o

        the VFS interface to the floppy streamer such that it can be
        accessed by tools like mt, tar or you favourite backup
        program(s).



     ./ftape/compressor/zft-compressor.o

        the ddeeccoommpprreesssseerr to preserve compatibility with _f_t_a_p_e_-_3_._0_4_d and
        earlier versions. The module does nnoott support compression any
        longer. See ``Compatibility with <em>ftape-3.04d</em>''.



     ./ftape/internal/ftape-internal.o

        the FDC driver for internal FDCs, including 82078 based 2Mbps
        controller and the Iomega Ditto EZ 4Mbps controller, with
        builtin support for PnP cards with kernel versions 2.3.* and
        later.



     ./ftape/parport/trakkker.o

        The driver for the parallel port Colorado Trakker floppy tape
        drive.



     ./ftape/parport/bpck-fdc.o

        The driver for the Micro Solutions parallel port Backpack floppy
        tape drives (i.e. the parallel port floppy tape drives of the
        Iomega Ditto product line).



       _N_o_t_e _t_h_a_t _t_h_e _s_f_t_a_p_e _m_o_d_u_l_e _a_s _w_e_l_l _a_s _t_h_e _f_t_a_p_e_f_m_t _m_o_d_u_l_e
       _h_a_v_e _v_a_n_i_s_h_e_d _f_r_o_m _t_h_e _d_i_s_t_r_i_b_u_t_i_o_n_. _s_f_t_a_p_e _(_i_m_p_l_e_m_e_n_t_i_n_g
       _t_h_e _V_F_S _i_n_t_e_r_f_a_c_e _o_f _f_t_a_p_e_-_2_._x_) _h_a_s _v_a_n_i_s_h_e_d _c_o_m_p_l_e_t_e_l_y
       _w_h_i_l_e _r_e_a_d _c_o_m_p_a_t_i_b_i_l_i_t_y _f_o_r _o_l_d _c_a_r_t_r_i_d_g_e_s _i_s _p_r_e_s_e_r_v_e_d _b_y
       _z_f_t_a_p_e_. _f_t_a_p_e_f_m_t _h_a_s _b_e_e_n _f_o_l_d_e_d _i_n_t_o ftape.o and the new
       user level formatting program ftformat that is distributed
       with the separate ftape-tools package.



  66..33..11..  FFDDCC__OOPPTT,, sseettttiinngg uupp ffoorr yyoouurr hhaarrddwwaarree


       NNoottee:: _S_i_n_c_e _v_e_r_s_i_o_n _3_._0_2 _o_f _f_t_a_p_e _t_h_e_r_e _i_s _a_l_s_o _t_h_e _p_o_s_s_i_-
       _b_i_l_i_t_y _t_o _c_o_n_f_i_g_u_r_e _t_h_e _d_r_i_v_e_r _m_o_d_u_l_e _l_o_a_d _t_i_m_e _r_e_s_p_e_c_t_i_v_e_l_y
       _b_o_o_t _t_i_m_e _o_f _t_h_e _s_y_s_t_e_m_. _T_h_a_t _m_e_a_n_s_, _F_D_C___O_P_T _o_n_l_y _g_i_v_e_s _t_h_e
       _d_e_f_a_u_l_t _s_e_t_t_i_n_g_s _t_h_e _d_r_i_v_e_r _u_s_e_s_. _S_e_e _`_`_L_o_a_d _t_i_m_e _c_o_n_f_i_g_u_r_a_-
       _t_i_o_n_'_'_.


  The most important makefile variable is FDC_OPT. However, you don't
  need to worry about it if you have connected your tape drive to the
  standard floppy controller.


  If you have connected your tape drive to a controller of either of the
  following types




     Secondary Floppy Controller

        Including (but not limited to) Ditto Dash, Exabyte accelerator,
        CTC-2Mb, Iomega Ditto EZ


     MOUNTAIN MACH-2


     Colorado CMS FC-10/FC-20


  or use one of the following floppy tape drives which connect to the
  parallel port




     Colorado Trakker


     Micro Solutions Backpack (i.e. Iomega Ditto)

  then you need to uncomment the corresponding lines in the file
  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> and replace the default values
  for CONFIG_FDC_BASE, CONFIG_FDC_IRQ and CONFIG_FDC_DMA with the values
  your hardware uses.


  Please refer to the manuals that came with your tape drive. Also, you
  may want to check which settings are used by the software that was
  shipped with your tape drive. Please try to use the hints given in the
  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> file.


  Let's have a look at an example for specifying controller defaults in
  the MCONFIG file. Say you have an internal tape drive plugged into the
  standard FDC controller, and a Colorado Trakker drive which connects
  to the parallel port. Say you want to use /dev/qft0 for the internal
  tape drive and /dev/qft1 for the parallel port tape drive, then the
  corresponding sections of the MCONFIG file would have to look like
  follows, after you have edited the file:



       [snip]
       FDC_OPT :=
       #
       # For a standard floppy tape controller, uncomment the following line:
       #
       STD_DEV=0
       FDC_OPT += -DCONFIG_FT_STD_FDC_$(STD_DEV)
       #
       [snip]
       #
       # For a HP Colorado Trakker parallel port drive, try
       #
       TRAKKER_DEV=1
       FDC_OPT +=      -DCONFIG_FT_FDC_PARPORT_$(TRAKKER_DEV)=-1 \
                       -DCONFIG_FT_FDC_DRIVER_$(TRAKKER_DEV)=\"trakker\"
       #
       [snip]




  Here [snip] refers to several lines of text which would have been left
  alone in this example. So, STD_DEV and TRAKKER_DEV determine the
  device node to be used for the respective tape drive, /dev/qft0 for
  the internal tape drive which is plugged into the standard controller,
  and /dev/qft1 for the Colorado Trakker tape drive. Similar remarks
  hole for the other FDC_OPT settings in the file
  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG>.


  66..33..22..  CCOONNFFIIGG__MMOODDVVEERRSSIIOONNSS,, vveerrssiioonneedd ssyymmbboollss


       NNoottee:: _y_o_u _d_o_n_'_t _n_e_e_d _t_o _s_e_t_/_u_n_s_e_t _t_h_i_s _o_p_t_i_o_n _y_o_u_r_s_e_l_f _i_f
       _y_o_u _h_a_v_e _a _k_e_r_n_e_l _s_o_u_r_c_e _t_r_e_e _i_n_s_t_a_l_l_e_d _u_n_d_e_r _t_h_e _l_o_c_a_t_i_o_n
       _g_i_v_e_n _i_n _t_h_e LINUX_LOCATION variable of the
       [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> _f_i_l_e_.


  The option that causes the most grief for me is CONFIG_MODVERSIONS.
  The easiest way to avoid problems with this stuff is to configure your
  kernel nnoott to use versioned symbols, recompile and install it and
  leave this option commented out, as it is by default. In principle the
  modules utilities should be able to insert modules with versioned
  symbols into kernels that haven't been configured for versioned
  symbols (or vice versa) but this need not be true for the modules
  utilities you try to use. Generally spoken, most versions of the
  modules utilities are broken in this respect. Sad :-( But true :-o


  I arrived at insertion of an _f_t_a_p_e module compiled without support for
  versioned symbols into a 2.0.30 kernel which had been compiled _w_i_t_h
  support for versioned symbols using the modutils-2.1.34.tar.gz
  modutils package. See ``Requirements''.  PPlleeaassee ttrryy ttoo uussee tthhee llaatteesstt
  vveerrssiioonn ooff tthhee modules utilities.


  66..33..33..  BBRROOKKEENN__FFLLOOPPPPYY__DDRRIIVVEERR

  Tell _f_t_a_p_e to ignore the bad behaviour of the floppy _d_i_s_k driver. If
  you don't want to use the patch contained in
  [/usr/src/ftape-4.04/]patches/v2.0/floppy.c.dif <floppy.c.dif>, then
  you should leave this option eennaabblleedd. If you have applied the patch,
  than please edit [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> and remove
  the variable -DBROKEN_FLOPPY_DRIVER. See ``v2.x.x''.

  At the time I'm writing this the latest version of the v2.1.x series
  of the kernel is 2.1.115 which still suffers from certain bugs in the
  floppy driver. You don't need the -DBROKEN_FLOPPY_DRIVER directive for
  Linux v2.1.115 but should apply the patch anyway.


  66..33..44..  CCOONNFFIIGG__FFTT__PPRROOCC__FFSS,, pprrooccffss  iinntteerrffaaccee ooff ffttaappee

  This option is eennaabblleedd by default. But please refer to the file
  [/usr/src/ftape-4.04/]BUGS <BUGS> to get to know about possible
  problems with pre-v2.1.* kernels.  If you leave this feature enabled
  then a directory ftape/ in the root directory of the proc file system
  is created (i.e. normally there will be an entry /proc/ftape/ if you
  didn't mount the proc file system somewhere else than under /proc/).
  The contents of this directory and its subdirectories is listed below.
  Of course, this is only an example to demonstrate which kind of
  information show up if you enable the proc file system interface. The
  actual contents of the files may be totally different from the example
  output given below, but I don't don' t intent to change the directory
  structure once more, so the example below basically is tthhee
  representative output of all that ls and cat commands.




     /proc/ftape/



          claus@anaximander:/proc/ftape > ls /proc/ftape/
          0/       1/       2/       3/       driver/





     /proc/ftape/driver



          claus@anaximander:/proc/ftape > ls /proc/ftape/driver/
          drivers  memory   version





     /proc/ftape/driver/drivers



          claus@anaximander:/proc/ftape > cat /proc/ftape/driver/drivers
          Lowlevel fdc drivers registered with ftape
          ftape-internal -- driver for internal FDC controllers (FC-10/FC-20/82078/Ditto EZ)
          Drivers registered for device 0: ftape-internal
          Drivers registered for device 1: trakker bpck-fdc
          Drivers registered for device 2: none
          Drivers registered for device 3: none





     /proc/ftape/driver/memory


     claus@anaximander:/proc/ftape > cat /proc/ftape/driver/memory
                   kmalloc
             driver    qft0    qft1    qft2    qft3    total
     -------------------------------------------------------
     used:        0    1108       0       0       0     1108
     peak:        0    1108       0       0       0     1108
                   vmalloc
             driver    qft0    qft1    qft2    qft3    total
     -------------------------------------------------------
     used:        0   29696       0       0       0    29696
     peak:        0   29696       0       0       0    29696
                   dma memory
                qft0    qft1    qft2    qft3    total
     ------------------------------------------------
     used:    131072       0       0       0   131072
     peak:    131072       0       0       0   131072





     /proc/ftape/driver/version



          claus@anaximander:/proc/ftape > cat /proc/ftape/driver/version
          ftape v4.04 07/21/2000
          (c) 1993-1996 Bas Laarhoven
          (c) 1995-1996 Kai Harrekilde-Petersen
          (c) 1996-2000 Claus-Justus Heine <heine@instmath.rwth-aachen.de)
          QIC-117 driver for QIC-40/80/3010/3020/Ditto 2GB/MAX floppy tape drives.
          Compiled for Linux version 2.4.0-test1 (SMP).





     /proc/ftape/0/



          claus@anaximander:/proc/ftape > ls /proc/ftape/0/
          cartridge   controller  history     tapedrive





     /proc/ftape/0/cartridge



          claus@anaximander:/proc/ftape > cat /proc/ftape/0/cartridge
          segments  :   748
          tracks    :    68
          length    :   386ft
          formatted : yes
          writable  : yes
          QIC spec. : Ditto Max
          fmt-code  : 6






     /proc/ftape/0/controller



          FDC_driver: ftape-internal -- driver for internal FDC controllers (FC-10/FC-20/82078/Ditto EZ)
          FDC type  : Iomega Dash EZ
          FDC base  : 0x210
          FDC irq   : 11
          FDC dma   : 0
          FDC thr.  : 15
          max. rate : 4000 kbit/sec
          rate limit: 4000 kbit/sec
          used rate : 4000 kbit/sec





     /proc/ftape/0/history



          claus@anaximander:/proc/ftape > cat /proc/ftape/0/history
          FDC isr statistics
           id_am_errors     :   0
           id_crc_errors    :   0
           data_am_errors   :   0
           data_crc_errors  :   0
           overrun_errors   :   0
           no_data_errors   :   0
           retries          :   0
          ECC statistics
           crc_errors       :   0
           crc_failures     :   0
           ecc_failures     :   0
           sectors corrected:   0
          tape quality statistics
           media defects    :   0
          tape motion statistics
           repositions      :   2





     /proc/ftape/0/tapedrive



          claus@anaximander:/proc/ftape > cat /proc/ftape/0/tapedrive
          vendor id : 0x8885
          drive name: Iomega DITTO MAX
          wind speed: 85 ips
          wakeup    : Colorado
          max. rate : 4000 kbit/sec
          used rate : 4000 kbit/sec




  66..33..55..  TTRRAACCEE__FFLLAAGGSS,, ddeebbuuggggiinngg oouuttppuutt

  The TRACE_FLAGS makefile variable controls the amount of debugging
  output the driver will be able to produce. By default, full debugging
  capabilities are enabled. Possible values are

     -DCONFIG_FT_NO_TRACE

        Disable all output except for warnings, errors and bug reports.


     -DCONFIG_FT_NO_TRACE_AT_ALL
        Disable everything except bug reports.


  Disabling debugging output dramatically reduces the size of the kernel
  module but makes debugging almost impossible. Generally, it is a good
  idea to test the driver with debugging _e_n_a_b_l_e_d and recompile it with
  debugging _d_i_s_a_b_l_e_d once you are sure that it works properly with your
  configuration.


  66..44..  IInnssttaalllliinngg tthhee kkeerrnneell mmoodduulleess aanndd uuttiilliittiieess


       NNoottee:: _Y_o_u _h_a_v_e _t_o _b_e root to install the driver. Either you
       login as root or do a su at the shell prompt.


  The makefile contains an install target. Before actually running make
  install you should check [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> for
  correctness of the installation location. Actually, you only need to
  worry about the MODULESDIR (-- KERNEL_VERSION stands for the version
  of the kernel _f_t_a_p_e was compiled for which is determined by parsing
  the file LINUX_LOCATION/include/linux/versions.h--)

  location and the default is most probably correct.




     MODULESDIR

        /lib/modules/KERNEL_VERSION/misc


  Simply typing




       make install




  in the top directory of the _f_t_a_p_e sources will result in the following
  actions:



  +o  Installation of










  <tt>./ftape/lowlevel/ftape.o</tt>,
  <tt>./ftape/zftape/zftape.o</tt>,
  <tt>./ftape/zftape/zft-compressor.o</tt>,
  <tt>./ftape/internal/ftape-internal.o</tt>,
  <tt>./ftape/parport/trakker.o</tt>,
  <tt>./ftape/parport/bpck-fdc.o</tt>




  under MODULESDIR which defaults to /lib/modules/KERNEL_VERSION/misc/.


  +o  creation of the device special files in the /dev/ directory, unless
     the kernel supports the devfs file system mounted under /dev/. In
     that case, device nodes mentioned below are created as symlinks to
     the real devices under /dev/ftape/ at module load time.


     Otherwise the device special files and some compatibility links are
     created by running the script
     [/usr/src/ftape-4.04/scripts/]MAKEDEV.ftape <MAKEDEV.ftape>.  The
     tape devices are character devices that use a major device number
     of 27 (see ``File System Interface'').


     Note that MAKEDEV.ftape doesn't change or delete /dev/ftape and
     /dev/nftape. Also, if MAKEDEV.ftape discovers that the devices it
     attempts to create already exist then it will prompt the user and
     asks him (or her) and whether it should overwrite those devices.


     The script produces the following entries in the /dev/ directory
     (output from ls -l /dev/*ft*). Please note the file access
     permissions of the devices which will inhibit the use of the tape
     driver by non-root users. You may want to change them to suite your
     needs (see man 1 chmod, man 1 chown).





























  crw-------   1 root     root      27,   4 Sep  2 02:23 /dev/nqft0
  crw-------   1 root     root      27,   5 Sep  2 02:23 /dev/nqft1
  crw-------   1 root     root      27,   6 Sep  2 02:23 /dev/nqft2
  crw-------   1 root     root      27,   7 Sep  2 02:23 /dev/nqft3
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrawft0 -> nqft0
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrawft1 -> nqft1
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrawft2 -> nqft2
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrawft3 -> nqft3
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrft0 -> nqft0
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrft1 -> nqft1
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrft2 -> nqft2
  lrwxrwxrwx   1 root     root            5 Sep  2 02:23 /dev/nrft3 -> nqft3
  crw-------   1 root     root      27,  20 Apr 17  1998 /dev/nzqft0
  crw-------   1 root     root      27,  21 Apr 17  1998 /dev/nzqft1
  crw-------   1 root     root      27,  22 Apr 17  1998 /dev/nzqft2
  crw-------   1 root     root      27,  23 Apr 17  1998 /dev/nzqft3
  crw-------   1 root     root      27,   0 Sep  2 02:23 /dev/qft0
  crw-------   1 root     root      27,   1 Sep  2 02:23 /dev/qft1
  crw-------   1 root     root      27,   2 Sep  2 02:23 /dev/qft2
  crw-------   1 root     root      27,   3 Sep  2 02:23 /dev/qft3
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rawft0 -> qft0
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rawft1 -> qft1
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rawft2 -> qft2
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rawft3 -> qft3
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rft0 -> qft0
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rft1 -> qft1
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rft2 -> qft2
  lrwxrwxrwx   1 root     root            4 Sep  2 02:23 /dev/rft3 -> qft3
  crw-------   1 root     root      27,  16 Apr 17  1998 /dev/zqft0
  crw-------   1 root     root      27,  17 Apr 17  1998 /dev/zqft1
  crw-------   1 root     root      27,  18 Apr 17  1998 /dev/zqft2
  crw-------   1 root     root      27,  19 Apr 17  1998 /dev/zqft3




  66..55..  UUnn--iinnssttaalllliinngg ffttaappee


       NNoottee:: _Y_o_u _h_a_v_e _t_o _b_e root to un-install the driver. Either
       you login as root or do a su at the shell prompt.


  The makefile contains an uninstall target. Note the makefile tries to
  remove the modules from the directory that is configured in the file
  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG> oonnllyy. If you have edited
  MCONFIG and changed the installation path prefixes after running make
  install then make uninstall will try to remove the files from the new
  locations which might not be what you want. Also, if running make
  uninstall with a new version of _f_t_a_p_e may not remove all the files of
  the old release of _f_t_a_p_e if the defaults for the installation paths
  have changed or if some of the modules or helper utilities have
  vanished from the new release.


  The installation paths in question can be configured by editing


  [/usr/src/ftape-4.04/]MCONFIG <MCONFIG>.


  As the _f_t_a_p_e helper utilities are now shipped with the separate ftape-
  tools distribution there is only a single variable left



       MODULESDIR = /lib/modules/$(KERNEL_VERSION)/misc




  where $(KERNEL_VERSION) is set by MCONFIG to the version of the kernel
  _f_t_a_p_e is compiled for.


  Simply typing




       make uninstall




  in the top directory of the _f_t_a_p_e sources will result in the following
  actions.



  +o  Removal of




       <tt>./ftape/lowlevel/ftape.o</tt>,
       <tt>./ftape/zftape/zftape.o</tt>,
       <tt>./ftape/zftape/zft-compressor.o</tt>,
       <tt>./ftape/internal/ftape-internal.o</tt>,
       <tt>./ftape/parport/trakker.o</tt>,
       <tt>./ftape/parport/bpck-fdc.o</tt>




  from MODULESDIR.


  +o  The device special files in /dev/ are nnoott removed with make
     uninstall.


  77..  LLooaaddiinngg tthhee KKeerrnneell MMoodduulleess

  The chapter gives an outline how to load the _f_t_a_p_e modules into the
  kernel so that the _f_t_a_p_e devices can be used. Other sources of
  information might be interest, too.
  [/usr/src/linux/]Documentation/modules.txt <modules.txt>.  See
  ``Modules Utilities''.


  This chapter doesn't deal with the kernel boot parameters which are
  understood by _f_t_a_p_e when having been compiled it into the kernel.
  Please refer to [/usr/src/linux/]Documentation/ftape.txt <ftape.txt>.


  77..11..  WWhhiicchh mmoodduulleess aarree nneeeeddeedd??

  This section describes how the modules depend on each other, and which
  modules are needed for which hardware.


     ftape.o

        The general floppy tape driver library ftape.o is the kernel of
        the _f_t_a_p_e device driver module stack. However, it neither knows
        how to actually talk to the FDC nor how to get the data from the
        user or copy the data from the tape drive to the user.


        ftape.o doesn't depend on any other of the _f_t_a_p_e modules, but it
        doesn't suffice to load it alone; one needs zftape.o as well as
        one of the FDC driver modules ftape-internal.o, trakker.o or
        bpck-fdc.o.



     zftape.o

        The VFS (-- Virtual File System--)

        interface which actually provides the _f_t_a_p_e devices. This module
        is rreeqquuiirreedd in order to access the tape from user space.


        zftape.o depends on the ftape.o module, but doesn't depend on
        the FDC modules.



     zft-compressor.o

        The _d_e_c_o_m_p_r_e_s_s_e_r for compressed volumes is considered oobbssoolleettee.
        It is kept in the distribution for compatibility reason so that
        people can decompress their old backups.  Compressed volumes
        were produced by _f_t_a_p_e_-_3_._0_4_d and earlier versions. zft-
        compressor.o depends on zftape.o and ftape.o, but doesn't depend
        on the FDC modules. You need this modules only when you want to
        extract compressed volumes produced by _f_t_a_p_e_-_3_._0_4_d and earlier
        versions of the driver.


        You don't need to load this module explicitly if you are using
        the kernel's module auto-loading facilities. _z_f_t_a_p_e will load it
        as needed.



     ftape-internal.o

        The FDC driver module that talks to internal FDCs. This is
        rreeqquuiirreedd when you have an internal tape drive.


        ftape-internal.o depends on ftape.o but doesn't depend on
        zftape.o nor on the obsolete module zft-compressor.o.



     trakker.o

        The FDC driver module that talks to the Colorado Trakker
        parallel port tape drive.  rreeqquuiirreedd when you have such a beast.


        trakker.o depends on ftape.o but doesn't depend on zftape.o nor
        on the obsolete zft-compressor.o.

     bpck-fdc.o

        The FDC driver module that talks to parallel port floppy tape
        drives with the Micro Solutions BackPack interface. You need
        this when you have e.g. any of the Iomega Ditto parallel port
        tape drives, in which case this module is rreeqquuiirreedd.


        bpck-fdc.o depends on ftape.o but doesn't depend on zftape.o nor
        on the obsolete zft-compressor.o


  Generally speaking, you always need to load ftape.o, zftape.o and one
  or more of the FDC driver modules ftape-internal.o, trakker.o or bpck-
  fdc.o.



       zft-compressor.o is needed only when you want to be able to
       read compressed volumes produced by _f_t_a_p_e_-_3_._0_4_d and earlier
       versions of the driver. If you are a first-time user of
       _f_t_a_p_e then you don't need it.


  77..22..  MMoodduullee aauuttoo--llooaaddiinngg

  _f_t_a_p_e_-_4_._0_4 can safely be used with the kerneld daemon or with the
  newer kmod module autoloading mechanism. The driver simply locks
  itself in memory under the following conditions:



  +o  The tape device has been opened (see man 2 open) and not yet been
     closed (see man 2 close).

  +o  The header segments are not up to date (see ``Rewinding and non-
     rewinding devices'', see ``MTREW'', see ``MTOFFL'').  This
     situation arises only when writing data to the tape.  MTWEOF has to
     be considered as a special means to write data (i.e. file marks,
     see ``MTWEOF'') to the tape, whereas  MTERASE is uncritical in this
     context as it takes care of the header segments itself.

  +o  The tape is not positioned at BOT (-- _B_e_g_i_n _O_f _T_a_p_e--)

     . This happens when the driver has been used with the _n_o_n-rewinding
     devices (see ``Rewinding and non-rewinding devices''). Such _n_o_t_-_a_t_-
     _B_O_T conditions arise when using MTFSF, MTBSF, MTBSFM, MTFSFM,
     MTFSR, MTBSR, MTSEEK and MTEOM. See ``MTIOCTOP'' for more
     information about these tape operations.

  +o  Of course, normal read and write operation also move the tape head
     away from BOT.

  +o  The tape block size has been changed. It is just evil when the
     driver would be unloaded after changing the block size because
     writing data packets to the tape that aren't a multiple of the tape
     block size result in an i/o error. The block size can be changed
     using the MTSETBLK operation (see ``Setting the block size'').

  +o  When it happens that the tape device is closed before a pending
     formatting process is finished then the drivers also keep their
     module lock intact. To be able to unload them, one has either to
     issue a MTRESET command or remove and reinsert the tape cartridge
     and open the tape device again. Issuing the MTRESET command should
     be preferred. See ``MTRESET''.

  Most of the above module locking situations can be cleared by simply
  rewinding the tape device when it isn't needed any more. However,
  please remember that this is nnoott the case when the tape block size has
  been changed using MTSETBLK. In this case one has to restore the
  default block size of 10k.




       mt -f /dev/nqft0 10240




  Other situations might require to send a MTRESET command to the
  driver, especially if a tape operation has been interrupted before
  completion. Think for example of removing the tape cartridge during a
  formatting procedure. The MTRESET command has the same effect (or
  should have) as re-inserting the tape cartridge and opening the tape
  device (see ``MTRESET'').


  The following is an example of what could happen when the driver would
  nnoott lock itself in memory:




       claus@anaxagoras:claus$ mt -f /dev/nqft0 eom
       claus@anaxagoras:claus$ sleep 120
       claus@anaxagoras:claus$ tar -cvvf /dev/nqft0 /usr/src/ftape-4.04




  When _f_t_a_p_e wwoouulldd be unloaded in between this wwoouulldd result in erasing
  the entire cartridge and then writing the new volume starting at BOT
  but as _f_t_a_p_e iiss nnoott unloaded this ddooeess nnoott result in erasing the
  entire cartridge.


  Keep in mind that the _f_t_a_p_e driver is quite large. Compiling the
  driver with full debugging support and loading _f_t_a_p_e and _z_f_t_a_p_e
  consumes roughly 250kb (including the 4 dma buffers the ftape-internal
  driver needs for the data transfer) so it might be a good idea to nnoott
  keep it in memory permanently.


  Please refer also to the documentation included in the modules (or
  modutils) package on how to configure the modules utilities for use
  with the kerneld program (see ``Requirements''). There is a short
  example how to modify /etc/conf.modules for use with _f_t_a_p_e. See
  ``Inserting ftape''.


  77..33..  LLooaadd ttiimmee ccoonnffiigguurraattiioonn

  _f_t_a_p_e_-_3_._0_4_d and later allow load time configuration of I/O-port,
  interrupt and dma channel and _a_l_l other options that determine which
  hardware _f_t_a_p_e expects to find.


  This section gives an overview about which option is interpreted by
  which _f_t_a_p_e module. Below, the prefix DEC always indicates a decimal
  value.

  77..33..11..  ffttaappee..oo  mmoodduullee ooppttiioonnss



     ft_tracings=TR0,TR1,TR2,TR3,GT

        Specify the trace levels for the ftape devices. TR0 to TR3
        correspond to the amount of debugging messages which are
        produced by each of the _f_t_a_p_e devices /dev/qft0 to /dev/qft3
        while GT (_G_e_n_e_r_a_l _T_r_a_c_e_-_l_e_v_e_l) sets the trace level for messages
        that can't be mapped to a specific device. TR#X is a decimal
        number which controls the verbosity of the driver in the
        following manner:




        0

           print bugs


        1  + errors


        2  + warnings


        3  + information


        4  + more information


        5  + program flow


        6  + fdc/dma info


        7  + data flow


        8  + everything else


        It is also possible to tune the amount of debugging output at
        run-time (see ``MTSETDENSITY'') as well as to set a limit to the
        amount of debugging output _f_t_a_p_e is able to produce at all (see
        ``TRACE_FLAGS'').



     ft_fdc_driver=DRV0,DRV1,DRV2,DRV3

        Define which FDC driver to use for which _f_t_a_p_e device. DRV0 to
        DRV3 are strings which serve as identifiers for the FDC drivers
        and are passed as argument to the kernel's module auto-loading
        mechanism and thus simply give the module name of the FDC
        module.


        In short, DRV#X should be one out of ftape-internal, trakker,
        bpck-fdc or none. In case you don't know which driver to use,
        you can specify multiple drivers per device by separating them
        with a colon. An example parameter specification for using the
        ftape-internal module for /dev/qft0 and the trakker or bpck-fdc
        module for /dev/qft1 would look like follows




          ft_fdc_driver=ftape-internal,trakker:bpck,none,none




     The special keyword none serves to disable the devices /dev/qft2
     and /dev/qft3 (in this example). Actually, instead of none one
     could use aannyy string which is not the name of an existing module.
     So, instead of none the string n would serve the same purpose as
     would aunt_Jane as well as any string except the name of an
     existing module. However, the special name none prevents _f_t_a_p_e from
     passing the parameter to the kernel module auto-loading mechanism.


     If you leave the FDC driver specification for the third and fourth
     device blank as in the following example:




          ft_fdc_driver=ftape-internal,trakker:bpck




     then _f_t_a_p_e module will try all already loaded FDC drivers for
     /dev/qft2 and /dev/qft3 in order to search for additional tape
     drives. The same affect is achieved by passing the special keyword
     auto as FDC driver name, or by passing the empty string.


  77..33..22..  zzffttaappee..oo

  No options available (-- No Options? No, a small village of
  unterminated options still fights the GOT (General Options
  Terminator). RTSC (Read The Source Code)--)

  .


  77..33..33..  zzfftt--ccoommpprreessssoorr..oo

  No options available. Besides, this module is only needed to
  decompress compressed volume created by _f_t_a_p_e_-_3_._0_4_d and earlier
  versions.  See ``Compatibility with <em>ftape-3.04d</em>''.


  77..33..44..  ffttaappee--iinntteerrnnaall..oo



     ft_fdc_base=HEX0,HEX1,HEX2,HEX3

        The base address of your FDC. To configure the base address of
        the FDC used with /dev/qft#X you have to specify the value for
        HEX#X.




     ft_fdc_irq=DEC0,DEC1,DEC2,DEC3

        The IRQ (interrupt) line of your FDC. To configure the IRQ
        channel of the FDC used with /dev/qft#X you have to specify the
        value for DEC#X.



     ft_fdc_dma=DEC0,DEC1,DEC2,DEC3

        The DMA (direct memory access) channel of your FDC. To configure
        the DMA channel of the FDC used with /dev/qft#X you have to
        specify the value for DEC#X.



     ft_fdc_fc10=EN0,EN1,EN2,EN3

        The Colorado FC-10/FC-20 controller needs special initialisation
        code. Setting EN#X to 1 enables this code for device /dev/qft#X,
        setting it to 0 disables.



     ft_fdc_mach2=EN0,EN1,EN2,EN3

        The Moutain MACH-2 controller has a second _D_O_R (-- Digital
        Output Register--)

        which is not present in other FDCs and has to be programmed as
        well. Setting EN#X to 1 enables use of this register for
        /dev/qft#X, setting it to 0 disables.



     ft_fdc_pnp_vendor=VEN0,VEN1,VEN2,VEN3


     ft_fdc_pnp_dev=DEV0,DEV1,DEV2,DEV3


     ft_fdc_pnp_fct=FCT0,FCT1,FCT2,FCT3

        Please refer to the ISAPnP documentation of the kernel ISAPnP
        support of recent kernels (post-2.3.46). If you are using the
        _I_o_m_e_g_a _D_i_t_t_o _D_a_s_h controller then all you need to do is to load
        ftape-internal.o with the option ft_fdc_pnp_vendor=a which will
        attempt auto-detection of some known PnP cards. Actually, the
        Ditto Dash controller is the only PnP card ftape-internal.o
        knows about at the moment.


  77..33..55..  ttrraakkkkeerr..oo bbppcckk--ffddcc..oo



     ft_fdc_parport=DEC0,DEC1,DEC2,DEC3



        _P_r_e_-_v_2_._1_._x _k_e_r_n_e_l_s

           A value between 0 and 2. 0 corresponds to 0x378, 1 means
           0x278 and 2 sets the base address to 0x3bc.


        _L_i_n_u_x _v_2_._1_._x _a_n_d _l_a_t_e_r

           The parport number to use. Please see


           [/usr/src/linux/]Documentation/parport.txt


           for more information.


        To configure the base address of the parallel port used with
        /dev/qft#X you have to specify the value for DEC#X.



     _f_t___f_d_c___b_a_s_e_=_H_E_X_0_,_H_E_X_1_,_H_E_X_2_,_H_E_X_3

        UUnnssuuppppoorrtteedd wwiitthh vv22..11..xx kkeerrnneellss. The base address of your
        parallel port. To configure the base address of the parallel
        port used with /dev/qft#X you have to specify the value for
        HEX#X.



     _f_t___f_d_c___i_r_q_=_D_E_C_0_,_D_E_C_1_,_D_E_C_2_,_D_E_C_3

        UUnnssuuppppoorrtteedd wwiitthh vv22..11..xx kkeerrnneellss. The IRQ (interrupt) line of
        your parallel port. To configure the IRQ channel of the parallel
        port used with /dev/qft#X you have to specify the value for
        DEC#X.


  77..33..66..  AAllll FFDDCC ddrriivveerr mmoodduulleess

  The following options are understood by all FDC driver modules i.e. by
  ftape-internal.o, trakker.o and bpck-fdc.o.




     ft_fdc_threshold=DEC0,DEC1,DEC2,DEC3

        Set the FIFO threshold of your FDC DEC#X takes values between 1
        and 16. Setting DEC#X sets the threshold for /dev/qft#X.



     ft_fdc_rate_limit=DEC0,DEC1,DEC2,DEC3

        Set the maximum allowable data rate for the FDC. DEC#X has to be
        one of 250, 500, 1000, 2000, 3000 or 4000. Note that QIC-40 tape
        drives always operate at 250 kilobits/second, QIC-80 tape drives
        at either 500 or 1000, as well as QIC-3010 tape drives. QIC-3020
        (i.e. TR-3) need at least 1000 and the Ditto Max may need at
        least 2000 (the docs say 1000, but I'm not sure). Setting DEC#X
        sets the rate limit for /dev/qft#X.


  ft_fdc_rate_limit and ft_fdc_threshold are useful in case you find
  reduced data rate because of excessive overrun errors messages in your
  kernel log files. In this case, try first to increase the FIFO
  threshold, and if this doesn't help try to set the ft_fdc_rate_limit
  to a lower value. Try 1000 for QIC-3020 tape drives (i.e. TR-3) and
  3000 for the Ditto Max.

  77..44..  IInnsseerrttiinngg tthhee ffttaappee  mmoodduulleess iinnttoo tthhee kkeerrnneell


       NNoottee:: _Y_o_u _h_a_v_e _t_o _b_e root to insert a kernel module into the
       kernel or to edit the file /etc/conf.modules. Either you
       login as root or do a su at the shell prompt.



       NNoottee:: _Y_o_u _n_e_e_d _a _k_e_r_n_e_l wwiitthhoouutt support for _f_t_a_p_e compiled
       into the kernel image. Please check the file /proc/devices
       for a line like 27 ft. If /proc/devices contains such a line
       (-- Of course, the _f_t_a_p_e device in /proc/devices will also
       show up if any version of the ftape _m_o_d_u_l_e is loaded.--)

       , then you need to reconfigure your kernel wwiitthhoouutt support
       for _f_t_a_p_e enabled, i.e. answer no to the






       Ftape (QIC-80/Travan) support






       _q_u_e_s_t_i_o_n_. _R_e_c_o_m_p_i_l_e _a_n_d _i_n_s_t_a_l_l _t_h_e _n_e_w _k_e_r_n_e_l _i_n _t_h_e _n_o_r_m_a_l
       _w_a_y_.


  You now have to decide whether you prefer loading _f_t_a_p_e explicitly
  (e.g. from the startup scripts during system boot) or by using the
  kernel module auto-loading mechanism.


  77..44..11..  MMooddiiffyyiinngg //eettcc//ccoonnff..mmoodduulleess

  Regardless whether you want to load _f_t_a_p_e explicitly or use the kernel
  auto-loading mechanism for loading it you should first edit the file
  /etc/conf.modules.


  77..44..11..11..  PPrreeppaarree ffoorr mmoodduullee aauuttoo--llooaaddiinngg

  Add the following to /etc/conf.modules. If there already is a alias
  char-major-27 ... line then you have to comment it out first by
  prepending a hash # at the beginning of that line first.




       #
       # load ftape/zftape automatically
       #
       alias char-major-27 zftape




  The line alias char-major-27 zftape is important for auto-loading of
  modules with the kernel module auto-loading mechanism program. This
  line instructs the module-auto-loading program to load _z_f_t_a_p_e when the
  kernel requires a driver for a character device with major number 27.


  77..44..11..22..  FFDDCC ddrriivveerrss ssppeecciiffiiccaattiioonn iinn //eettcc//ccoonnff..mmoodduulleess

  Tell the ftape.o modules which low-level FDC drivers it should use
  with the ft_fdc_driver options (see ``ftape.o''). Add the line that
  suits your setup to /etc/conf.modules. See ``Which modules are
  needed?''.




     _S_i_n_g_l_e _i_n_t_e_r_n_a_l _t_a_p_e _d_r_i_v_e



          options ftape ft_fdc_driver=ftape-internal,none,none,none





     _S_i_n_g_l_e _C_o_l_o_r_a_d_o _T_r_a_k_k_e_r _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e



          options ftape ft_fdc_driver=trakker,none,none,none





     _S_i_n_g_l_e _B_a_c_k_p_a_c_k _c_o_m_p_a_t_i_b_l_e _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e



          options ftape ft_fdc_driver=bpck-fdc,none,none,none





     _A_u_t_o_-_p_r_o_b_e _f_o_r _e_i_t_h_e_r _T_r_a_k_k_e_r _o_r _B_a_c_k_P_a_c_k



          options ftape ft_fdc_driver=trakker:bpck-fdc,none,none,none





     _I_n_t_e_r_n_a_l _a_n_d _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e_s

        The following line should be used when you have an internal
        floppy tape drive installed and want to be able to use a
        parallel port tape drive as well. This example auto-probes for
        either a Colorado Trakker tape drive or a Backpack tape drive at
        the parallel port tape drive. As it seems that the internal
        Iomega Ditto Max can't be used with other _f_t_a_p_e devices than
        /dev/qft0 this example configures _f_t_a_p_e to use /dev/qft0 for the
        internal tape drive.



     options ftape ft_fdc_driver=ftape-internal,trakker:bpck-fdc,none,none





     _T_o_t_a_l_l_y _f_u_d_g_e_d _o_u_t _s_e_t_u_p

        Assume you are crazy and have two internal tape drives which
        should be used with /dev/qft0 and /dev/qft2, and have a Colorado
        Trakker parallel port tape drive which is glued to /dev/qft1 and
        several other parallel port tape drives floating around (either
        Colorado Trakker or with the Micro Solutions BackPack interface)
        which optionally might be used with /dev/qft3, then the
        following over-kill setup is appropriate (but why didn't you buy
        a DAT tape drive as backup medium in this case???)




          options ftape ft_fdc_driver=ftape-internal,trakker,\
          ftape-internal,trakker:bpck-fdc




     The line has been broken for better readability.


  77..44..11..33..  FFDDCC ddrriivveerr ooppttiioonnss iinn //eettcc//ccoonnff..mmoodduulleess

  Please refer to the previous section (see ``Load time configuration'')
  for a detailed description of the available options.  Options are
  added to /etc/conf.modules like follows




       options MODULENAME OPTION=OPTIONVALUE




  Please take a look at the modprobe man-page also (see man 1 modprobe).


  77..44..11..44..  AAuuttoommaatteedd mmeemmoorryy ddee--ffrraaggmmeennttaattiioonn wwiitthh sswwaappoouutt

  In case you have problems with loading the ftape-internal.o module
  then memory fragmentation problems might (but need not ...) be the
  cause.


  In this case, try adding




       pre-install ftape-internal /usr/local/bin/swapout MEGS




  to your /etc/conf.modules file. MEGS specifies the number of megabytes
  (1024 times 1024 bytes) swapout tries to allocate.  This tells the
  modprobe program to run /sbin/swapout MEGS automatically _b_e_f_o_r_e trying
  to load ftape-internal.o. swapout is only available on your system if
  you installed the ftape-tools package. Also /usr/local/bin/ only
  reflects the default installation path of swapout and may be different
  on your system. See ``Optional utilities''.


  The hack might be necessary to decrease memory fragmentation of your
  computer system because ftape-internal.o needs at least 4 contiguous
  dma buffers of size 32kb. You may need to increase the amount of
  memory swapout allocates (the MEGS argument). My computer system has
  20 Megs of RAM (and lots of swap space) and I go with swapout 15.
  There is more information in a separate section. See ``Swapout''.


  77..44..11..55..  CCoommpplleettee eexxaammpplleess ffoorr //eettcc//ccoonnff..mmoodduulleess

  The following table tries to give some complete example setups. DDoonn''tt
  ccooppyy tthheessee eexxaammpplleess uunnmmooddiiffiieedd.. You have to adjust the IO address, IRQ
  channel and DMA channel to the proper values for your hardware setup.




     _S_i_n_g_l_e _i_n_t_e_r_n_a_l _t_a_p_e _d_r_i_v_e



          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user ftape-internal.o for /dev/qft0
          options ftape ft_fdc_driver=ftape-internal,none,none,none
          # use standard fdc controller.
          options ftape-internal ft_fdc_base=0x3f0 ft_fdc_irq=6 ft_fdc_dma=2
          # make sure to have enough swap space
          pre-install ftape-internal /usr/local/bin/swapout 15




     swapout is only available on your system if you installed the
     ftape-tools package. Also /usr/local/bin/ only reflects the default
     installation path of swapout and may be different on your system.
     See ``Optional utilities''.



     _S_i_n_g_l_e _i_n_t_e_r_n_a_l _t_a_p_e _d_r_i_v_e_, _u_s_i_n_g _a_n _D_i_t_t_o _E_Z _c_o_n_t_r_o_l_l_e_r _c_a_r_d



          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user ftape-internal.o for /dev/qft0
          options ftape ft_fdc_driver=ftape-internal,none,none,none
          # use standard fdc controller.
          options ftape-internal ft_fdc_base=0x3f0 ft_fdc_irq=6 ft_fdc_dma=2 ft_fdc_pnp_vendor=a
          # make sure to have enough swap space
          pre-install ftape-internal /usr/local/bin/swapout 15




     swapout is only available on your system if you installed the
     ftape-tools package. Also /usr/local/bin/ only reflects the default
     installation path of swapout and may be different on your system.
     See ``Optional utilities''.
     _S_i_n_g_l_e _C_o_l_o_r_a_d_o _T_r_a_k_k_e_r _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e



          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user trakker.o for /dev/qft0
          options ftape ft_fdc_driver=trakker,none,none,none
          # no special options required for the trakker.o module





     _S_i_n_g_l_e _B_a_c_k_p_a_c_k _c_o_m_p_a_t_i_b_l_e _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e



          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user bpck-fdc.o for /dev/qft0
          options ftape ft_fdc_driver=bpck-fdc,none,none,none
          # no special options required for the bpck-fdc.o module





     _A_u_t_o_-_p_r_o_b_e _f_o_r _e_i_t_h_e_r _T_r_a_k_k_e_r _o_r _B_a_c_k_P_a_c_k



          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user trakker or bpck-fdc for /dev/qft0
          options ftape ft_fdc_driver=trakker:bpck-fdc,none,none,none
          # no special options required for the trakker.o or bpck-fdc.o module





     _I_n_t_e_r_n_a_l _a_n_d _p_a_r_a_l_l_e_l _p_o_r_t _t_a_p_e _d_r_i_v_e_s

        The following line should be used when you have an internal
        floppy tape drive installed and want to be able to use a
        parallel port tape drive as well. This example auto-probes for
        either a Colorado Trakker tape drive or a Backpack tape drive at
        the parallel port tape drive. As it seems that the internal
        Iomega Ditto Max can't be used with other _f_t_a_p_e devices than
        /dev/qft0 this example configures _f_t_a_p_e to use /dev/qft0 for the
        internal tape drive.




          # load ftape/zftape automatically
          alias char-major-27 zftape
          # user ftape-internal.o for /dev/qft0 and trakker.o or bpck-fdc.o for /dev/qft1
          options ftape ft_fdc_driver=ftape-internal,trakker:bpck-fdc,none,none
          # use standard fdc controller.
          options ftape-internal ft_fdc_base=0x3f0 ft_fdc_irq=6 ft_fdc_dma=2
          # make sure to have enough swap space
          pre-install ftape-internal /usr/local/bin/swapout 15
          # no special options required for the trakker.o or bpck-fdc.o module

     swapout is only available on your system if you installed the
     ftape-tools package. Also /usr/local/bin/ only reflects the default
     installation path of swapout and may be different on your system.
     See ``Optional utilities''.



     _T_o_t_a_l_l_y _f_u_d_g_e_d _o_u_t _s_e_t_u_p

        Assume you are crazy and have two internal tape drives which
        should be used with /dev/qft0 and /dev/qft2, and have a Colorado
        Trakker parallel port tape drive which is glued to /dev/qft1 and
        several other parallel port tape drives floating around (either
        Colorado Trakker or with the Micro Solutions BackPack interface)
        which optionally might be used with /dev/qft3, then the
        following over-kill setup is appropriate (but why didn't you buy
        a DAT tape drive as backup medium in this case???)




          alias char-major-27 zftape
          options ftape ft_fdc_driver=ftape-internal,trakker,ftape-internal,trakker:bpck-fdc
          options ftape-internal ft_fdc_base=0x3f0 ft_fdc_irq=6 ft_fdc_dma=2
          pre-install ftape-internal /usr/local/bin/swapout 15




     swapout is only available on your system if you installed the
     ftape-tools package. Also /usr/local/bin/ only reflects the default
     installation path of swapout and may be different on your system.
     See ``Optional utilities''.


  77..44..22..  UUssiinngg tthhee kkeerrnneell''ss mmoodduullee aauuttoo--llooaaddiinngg mmeecchhaanniissmm

  _f_t_a_p_e is able to use the kernel's module auto-loading facility to load
  the FDC drivers specified with the ft_fdc_driver option automatically
  (see ``<tt>ftape.o</tt> module options''). So there is no need to load
  these modules manually when your kernel supports auto-loading of
  kernel modules. There is a separate section with further remarks about
  _f_t_a_p_e and module auto-loading. See ``Autoloading''.


  If you want to use the kernel's auto-loading mechanism then all
  preparation needed is to modify /etc/conf.modules as described in the
  previous section, See ``conf.modules''.


  And, of course, the kernel must support auto-loading of kernel
  modules. Please refer to [/usr/src/linux/]Documentation/modules.txt
  for more information.


  77..44..33..  LLooaaddiinngg tthhee ddrriivveerr wwiitthh mmooddpprroobbee

  What follows are an example how to insert the driver manually into the
  kernel using the modprobe utility. NNoottee tthhaatt yyoouu hhaavvee ttoo bbee root to do
  that.


  As we use modprobe which scans the /etc/conf.modules file there is no
  need to specify any modules options explicitly. Edit /etc/conf.modules
  instead! See ``Modifying <tt>/etc/conf.modules</tt>''. Of course, if
  you don't have a parallel port tape drive, then you don't need to load
  trakker.o of bpck-fdc.o.




       modprobe zftape
       modprobe zft-compressor
       modprobe ftape-internal
       modprobe trakker
       modprobe bpck-fdc




  In detail, this has the following effect: modprobe reads the file
  /etc/conf.modules and the file /lib/modules/$(uname -r)/modules.dep
  and deduces from the information found therein that is has to do run
  the following commands in the given order:




     /sbin/insmod /lib/modules/$(uname -r)/misc/ftape.o FTAPE_OPTIONS


     /sbin/insmod /lib/modules/$(uname -r)/misc/zftape.o


     /sbin/insmod /lib/modules/$(uname -r)/misc/zft-compressor.o


     /usr/local/bin/swapout MEGS


     /sbin/insmod /lib/modules/$(uname -r)/misc/ftape-internal.o
        FTAPE_INTERNAL_OPTIONS


     /sbin/insmod /lib/modules/$(uname -r)/misc/trakker..o
        TRAKKER_OPTIONS


     /sbin/insmod /lib/modules/$(uname -r)/misc/bpck-fdc.o BPCK_OPTIONS

  where the ...OPTIONS have to substituted by the values given in the
  appropriate options line for the respective module. See ``Modifying
  <tt>/etc/conf.modules</tt>''. See ``Automated memory de-
  fragmentation''. swapout is only available on your system if you
  installed the ftape-tools package. Also /usr/local/bin/ only reflects
  the default installation path of swapout and may be different on your
  system. See ``Optional utilities''.


  Of course, if you don't have a parallel port floppy tape drive then
  you may omit the lines




       modprobe trakker
       modprobe bpck-fdc





  and if you don't have an internal floppy tape drive, then




       modprobe ftape-internal




  isn't needed. If you are a first-time _f_t_a_p_e user then you can omit




       modprobe zft-compressor




  as well as you don't need it. See ``Compatibility with
  <em>ftape-3.04d</em>''.


  88..  TTeessttiinngg tthhee ddrriivveerr

  This chapter describes some basic tests for the _f_t_a_p_e driver. The last
  three sections (see ``ftape Debugging Messages'', ``Output of the
  status command'', ``Syslog example'') contain some sample output that
  may be produced while testing the driver. The first section gives a
  brief description of some utilities contained in the ftape-tools
  package which might be useful for testing (and using) the driver.  The
  remainder of this chapter assumes that you have the ftape-tools
  package installed on your system. You probably can live without the
  ftape-tools package if you have plenty of RAM. See ``Swapout''. If you
  don't have the ftape-tools package installed on your system, then you
  have to replace the command name ftmt by mt in the examples given
  below. See ``Running the tests''.


  88..11..  UUsseeffuull uuttiilliittiieess ffoorr ffttaappee

  This section lists some of the utilities contained in the ftape-tools
  package which might be needed to test the drive successfully.  The
  ftape-tools package to be obtained either from


  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/


  or from the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>.


  88..11..11..  SSwwaappoouutt,, tthhee mmeemmoorryy ddee--ffrraaggmmeennttaattiioonn uuttiilliittyy

  You'll need the swapout utility when you stumble over messages like
  Couldn't allocate dma-buffer #0 printed to your kernel message log
  files. The swapout program is part of the separate ftape-tools
  distribution which can be downloaded from the usual places (-- Ftape
  home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  or
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  The following is an attempt to give you some hints why the swapout
  program is needed. See Swapout (info file ftape-tools).



       The data on a floppy tape cartridge is organised in entities
       of 1024 bytes, so called _s_e_c_t_o_r_s. 32 of those sectors con-
       stitute a so called floppy tape _s_e_g_m_e_n_t. When the tape is
       running (i.e. when you make backups or restore data) there
       is enough time between two subsequent floppy tape segments
       to program the floppy tape controller and the DMA controller
       for the next segment. In essence this means that one needs
       to transfer the data from the host computer to the floppy
       tape in 32kb entities. Therefore one needs contiguous pieces
       of RAM of size 32Kb. The physical RAM of the computer, how-
       ever, is organised in entities of 4Kb, so called _p_a_g_e_s. This
       means that it might be very well the case that there is
       indeed plenty of free RAM on your computer system, but the
       RAM is fragmented in a way that the system (Linux) is unable
       to provide pieces of 32Kb of contiguous memory.


  To cope with this problem, there exists a small and ugly, but useful,
  utility called swapout, which does nothing but allocate a HHUUGGEE chunk
  of memory, dirty all pages (i.e. force the system to really allocate
  those pages) and exit. This forces the Linux kernel to swap out quite
  a lot of RAM. As a result, the physical RAM of the computer gets de-
  fragmented (if you are lucky ...).


  The program swapout takes an optional parameter that specifies the
  amount of memory to allocate in megabytes. E.g.




       swapout 15




  allocates 15 Megs of memory  (-- Note for Un*x novices: once a process
  has finished it returns all allocated memory back to the operating
  system. A program that allocates, say, 100 Megs of memory,
  automatically releases this memory when it ceases to exist. This means
  that you needn't worry about swapout eating up all of the memory of
  you computer.--)

  . By default swapout allocates 5 Megs of memory. It might be necessary
  to tune this to get reasonable de-fragmentation of the system's
  memory. If you own a computer with plenty of RAM it might be necessary
  to make swapout allocate more than 5 Megs  (-- My machine currently
  has 20 megabytes of RAM and I call swapout with an argument of 15,
  making it allocate 15 megabytes of memory. Make sure that you have
  enough swap space ...  More up-to-date note: My mmoosstt rreecceenntt bought
  system has 128mb of RAM, and I never have experienced this problem
  with that machine ... lucky me ...--)

  .


  You may want to automatically run swapout when loading the driver with
  modprobe. See ``Inserting ftape''. swapout is only available on your
  system if you installed the ftape-tools package. Also /usr/local/bin/
  only reflects the default installation path of swapout and may be
  different on your system. See ``Optional utilities''.
  88..11..22..  TThhee ttaappee ccoonnttrrooll pprrooggrraamm

  The ftape-tools package contains a modified version of the mt program.
  The original was taken from the GNU cpio package. I've modified it to
  support the additional ioctls provided by _z_f_t_a_p_e (see ``File System
  Interface'').


  This program is contained in the ftape-tools package to be obtained
  either from


  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/


  or from the


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>.


  88..11..33..  TThhee vvoolluummee ttaabbllee mmaanniippuullaattiioonn pprrooggrraamm

  vtblc is a small utility that allows you to modify certain fields of
  the volume table (see ``ftape-3x file marks''). You'll need this only
  if you want other operating system to display date and time stamps
  correctly or if you want to truncate the volume table. vtblc is
  contained in the ftape-tools package to be obtained from the usual
  places (-- Ftape home page <http://www.instmath.rwth-
  aachen.de/~heine/ftape>
  or
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  .  See Vtblc (info file ftape-tools). You won't need this program for
  the tests described in this chapter, see ``Running the tests''. But
  vtblc is listed here for completeness.


  88..11..44..  TThhee ffllooppppyy ttaappee ccaarrttrriiddggee ffoorrmmaatttteerr

  ftformat is needed in case you want to format floppy tape cartridges.


  ftformat is contained in the ftape-tools package to be obtained from
  the usual places, too (-- Ftape home page <http://www.instmath.rwth-
  aachen.de/~heine/ftape>
  or
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  .  See Vtblc (info file ftape-tools).  You won't need this program for
  the tests described in this chapter, see ``Running the tests''. But
  ftformat is listed here for completeness.


  88..22..  AAvvooiiddiinngg ssuuppeerr uusseerr pprriivviilleeggeess

  Before you can test the tape driver, you have to load the kernel
  modules into the kernel. Please refer to the previous section on how
  to do this, See ``Loading ftape''.


  Throughout this chapter I will use the name /dev/qft0 as an example
  for a rewinding tape device, and /dev/nqft0 as an example for a non-
  rewinding tape device.


  Note that you have to be root to insert a kernel module into the
  kernel as well as for installing the _f_t_a_p_e package in the proper
  places. _B_u_t _y_o_u _n_e_e_d_n_'_t _b_e root to test the driver and I ssttrroonnggllyy
  recommend that you test the driver using an ordinary user account. To
  allow an ordinary user to access the tape device please type in the
  following commands at the shell prompt:




       su
       chmod a+rw /dev/qft0
       chmod a+rw /dev/nqft0
       exit





       _D_o_n_'_t _f_o_r_g_e_t _t_o _r_e_s_t_o_r_e _t_h_e _o_r_i_g_i_n_a_l _f_i_l_e _a_c_c_e_s_s _p_e_r_m_i_s_s_i_o_n_s
       _f_o_r _t_h_e _t_a_p_e _d_e_v_i_c_e_s _w_h_e_n _y_o_u _h_a_v_e _f_i_n_i_s_h_e_d _t_e_s_t_i_n_g _t_h_e
       _t_a_p_e_. _A_n _e_x_a_m_p_l_e _h_o_w _t_o _d_o _t_h_i_s _i_s _i_n_c_l_u_d_e_d _a_t _t_h_e _e_n_d _o_f
       _t_h_i_s _c_h_a_p_t_e_r_.


  88..33..  PPeerrffoorrmmiinngg ssaammppllee bbaacckkuuppss

  Now it is time to get a floppy tape cartridge and to insert it into
  your floppy tape drive. Wait for the drive to stop making noise (most
  tape drives start calibrating the head when a new tape is loaded). Now
  try if the drive is recognised:




       ftmt -f /dev/qft0 status




  This will try to open the device (see ``Output of the status command''
  to view sample output from this command (-- If you get This is a
  floppy tape drive, drive type = xyz, drive name unknown. not stating
  the name of your floppy tape drive, then this simply means that the
  _f_t_a_p_e driver doesn't know the name of your tape drive. There is
  nothing to worry about as long as you are able to use your tape
  drive.--)

  ). Because initially the variable ft_tracing is set to some value
  greater than zero (see ``Configure ftape''), some debugging output
  (produced by the kernel function printk) is generated on the console
  (-- Note that newer kernels allow redirection of the kernel messages
  to a specific virtual console. So if you don't like the messages to
  appear on every console you've opened, then refer to you kernel log
  daemon documentation how to do this.--)

  . Please don't worry too much if the messages your driver produces are
  a bit different from the sample output provided in this documentation.
  In general, you can ignore the debugging messages the driver produces
  as long as it works otherwise, i.e. is able to read and write data to
  and from your tape drive.  Some of the messages you may be confronted
  with are mentioned in subsections at the end of this chapter (see
  ``ftape Debugging Messages'').



  Now it is the time to actually write some data to the tape. But before
  you try to do this you should retension the tape cartridge. This is
  necessary because tape cartridges are very sensitive to stretch (see
  ``MTRETEN'') and because of the following (taken from the Seagate
  TST3200 Installation manual):



       Retention tape cartridges that have not been used for more
       than a month before restoring or backing up data. This
       retentioning removes unwanted tight spots that develop natu-
       rally on reeled media.


  Please type in the following commands at the shell prompt:




       ftmt -f /dev/nqft0 reten




  As a result, the tape cartridge will be wound to EOT (_E_n_d _O_f _T_a_p_e) and
  back to BOT (_B_e_g_i_n _O_f _T_a_p_e). It can take several minutes until the
  tape operation has completed.


  Having performed these preliminary steps please change to the top
  directory of the _f_t_a_p_e sources, e.g.




       cd /usr/src/ftape-4.04




  (or where ever you have unpacked the sources). Make a small sample
  backup of the ./ftape/zftape/ subdirectory, using the tar program:




       tar -cvf /dev/nqft0 ./ftape/zftape/




  Keep in mind that you should nnoott remove the cartridge before rewinding
  it. Please send a rewind command to the cartridge nnooww:




       ftmt -f /dev/nqft0 rewind   # rewind and update the header segments




  NNooww it is safe to remove the cartridge. Please do that, please remove
  the tape cartridge from the tape drive --- reinsert it afterwards and
  try to read the data back:

       tar -dvf /dev/nqft0   # compare the backup with the files on the hard disk




  tar shouldn't report any differences between the data stored on the
  tape and the files in the ./ftape/zftape/ directory.


  Using the _a_u_t_o _r_e_w_i_n_d_i_n_g devices you can omit the mt rewind step:




       ftmt -f /dev/nqft0 eom               # skip to end of data
       tar -cvf /dev/qft0 ./ftape/zftape   # perform the backup and rewind




  The example above will first skip to the end of the already recorded
  media and then make a backup of the ./ftape/zftape/ directory. It then
  will rewind the tape and update the header segments.



       NNoottee:: _T_h_e mt program must always use the nnoonn-rewinding
       devices for tape motion commands. The reason for this is
       simple: when the mt commands finishes, it closes the tape
       device, which causes a rewind of the tape when it is used
       with the auto-rewinding devices --- hereby annihilating the
       results of the tape motion command.


  You can use tar with the --verify option which will backspace to the
  beginning of the tape volume and start verifying it:




       ftmt -f /dev/nqft0 eom                # go to end of data
       tar -cvf /dev/nqft0 --verify contrib  # make the backup and verify
       ftmt -f /dev/nqft0 rewind             # rewind and update header segments




  Having been able to perform all of the tests above you can be pretty
  sure that the _f_t_a_p_e driver works correctly for you.



       NNoottee:: _y_o_u _c_a_n_'_t _s_i_m_p_l_y _u_s_e cat or the shell redirect > to
       write data to the tape when using _z_f_t_a_p_e. This probably is
       one of the most striking differences between _f_t_a_p_e2 and
       _z_f_t_a_p_e.  For _z_f_t_a_p_e, every read and write access must be a
       multiple of a fixed block size which defaults to 10kb (the
       default block size used by tar). See ``Tape blocks''.


  However, it is possible to switch to variable block size mode when
  using _z_f_t_a_p_e utilising ftmt -f /dev/qft0 setblk 0 (see ``MTSETBLK'').
  The above explanations mean that the example below will nnoott work:



       cat MCONFIG > /dev/nqft0        # try to dump `MCONFIG' to tape
       echo "Hello World" > /dev/qft0  # this will fail, too




  whereas the following wwiillll work:




       ftmt -f /dev/qft0 setblk 0      # switch to variable block size mode
       cat MCONFIG > /dev/nqft0        # dump `MCONFIG' to tape
       echo "Hello World" > /dev/qft0  # create a second volume and rewind




  Please keep in mind that changing the block size has the side effect
  to lock the module in memory (see ``Autoloading''). You'll have to
  reset the block size to 10k with ftmt -f /dev/qft0 setblk 10240 or
  issue a reset command ftmt -f /dev/qft0 reset (see ``MTRESET'') to be
  able to unload the modules.


  The remainder of the section gives some basic examples dealing with
  tape file marks. PPlleeaassee nnoottee tthhaatt ssoommee ccoommmmaannddss yyoouu sseenndd ttoo tthhee ddrriivvee
  ddoo nnoott rreessuulltt iinn iimmmmeeddiiaattee ttaappee mmoottiioonn bbuutt ssiimmppllyy cchhaannggee tthhee vvaalluuee ooff
  aann iinntteerrnnaall vvaarriiaabbllee ooff _f_t_a_p_e.. DDoonn''tt be alarmed if e.g. mt -f
  /dev/nqft0 fsf sseeeemmss not to have any affect at all. It hhaass the effect
  to increment the internal variable that holds the number of the tape
  volume the tape drive will use when trying to read data from the tape.


  When testing the file mark support of _f_t_a_p_e please note that the
  following two examples have exactly the same effect:



  1.




       ftmt -f /dev/nqft0 rewind  # rewind to BOT
       ftmt -f /dev/nqft0 fsf     # skip to the second volume
       tar -tvf /dev/nqft0        # list the contents of it
       tar -tvf /dev/nqft0        # this will simply skip the file mark
       tar -tvf /dev/nqft0        # list the contents of the third volume




  2.




       ftmt -f /dev/nqft0 rewind  # rewind to BOT
       ftmt -f /dev/nqft0 fsf     # skip to the second volume
       tar -tvf /dev/nqft0        # list the contents of it
       ftmt -f /dev/nqft0 fsf     # skip to the third volume
       tar -tvf /dev/nqft0        # list the contents of the third volume



  This is nnoott a bug of _f_t_a_p_e, but a feature of tar which is explained in
  another section of this manual. See ``File marks and <tt>tar</tt>''.


  Note that ftmt -f /dev/nqft0 bsf 1 always stays within the same
  volume:




       ftmt -f /dev/nqft0 rewind  # rewind to BOT
       ftmt -f /dev/nqft0 fsf 2   # go to the beginning of the third volume
       tar -tvf /dev/nqft0        # list the contents of the third volume
       ftmt -f /dev/nqft0 bsf 1   # go to the beginning of the current volume
       tar -tvf /dev/nqft0        # again, list the contents of the third volume
       ftmt -f /dev/nqft0 bsf 2   # this backspaces to the second volume!
       tar -tvf /dev/nqft0        # list the second volume




  Please refer to the section dealing with the ioctl interface to _f_t_a_p_e
  which also contains small examples on how to use the mt program to
  perform tape operations (see ``Ioctls'').


  _N_o_w _t_h_a_t _y_o_u _h_a_v_e _f_i_n_i_s_h_e_d _t_e_s_t_i_n_g _t_h_e _d_r_i_v_e_r_, _d_o_n_'_t _f_o_r_g_e_t _t_o _r_e_s_e_t
  _t_h_e _p_e_r_m_i_s_s_i_o_n_s _f_o_r _t_h_e _t_a_p_e _d_e_v_i_c_e _b_a_c_k _t_o _r_e_a_s_o_n_a_b_l_e _v_a_l_u_e_s_. _T_o
  _i_n_h_i_b_i_t _a_c_c_e_s_s _b_y _a_l_l _u_s_e_r_s _e_x_c_e_p_t _r_o_o_t_, _d_o _t_h_e _f_o_l_l_o_w_i_n_g _(_s_e_e man 1
  chmod):




       su
       chmod go-rw /dev/qft0
       chmod go-rw /dev/nqft0
       exit




  88..44..  OOtthheerr tteesstt rruunnss



     AAuuttoommaatteedd tteessttss uussiinngg tthhee ftape-tools package

        The latest revision of the ftape-tools package provides a check
        makefile target that preforms some automated tests with the ftmt
        and the vtblc program of the ftape-tools distribution. See
        Testing the Programs (info file ftape-tools).


        So you might want to use them as _a_d_d_i_t_i_o_n_a_l test cases, after
        running the simply tests described below.



     TThhee FFttaappee--HHOOWWTTOO

        The Ftape-HOWTO </usr/local/share/ftape-howto/html/ftape-
        howto.html> (-- See http://sunsite.unc.edu/LDP/HOWTO/Ftape-
        HOWTO.html for a more recent version.--)

        also has a chapter which describes how to perform a sample
        backup, read it back, append another backup.


  88..55..  ffttaappee  DDeebbuuggggiinngg mmeessssaaggeess



     wakeup type mismatch

        Follow the instructions in the message so that I can decide if I
        have to add this information to a new release of _f_t_a_p_e. There is
        nothing to worry about as long as the tape drive works.



     unexpected stray interrupt

        An unexpected interrupt has occurred. A bit ugly but should be
        harmless.



     unknown vendor id

        If some messages appear with unknown vendor id, follow the
        instructions in the message so that I can include this
        information with a new release. In the meantime the driver will
        function correctly if it is compatible with one of the known
        types.



     no tape drive found!

        One of the really _f_a_t_a_l error messages the drive can produce is
        no tape drive found! indicating that the driver cannot activate
        the drive. In this case you can try the other devices
        (/dev/qft1, /dev/qft2, /dev/qft3). In case they all fail the
        driver will not work with your drive.


        In simple cases this can mean that you used the wrong settings
        for the io-address, irq and dma specifications. Check the
        documentation of your drive and try to find out if the software
        that was shipped together with the tape drive uses (and works)
        with other settings than you used when configuring _f_t_a_p_e. See
        ``Compiling ftape'', particularly see ``FDC_OPT''.


  88..66..  OOuuttppuutt ooff ffttmmtt ssttaattuuss

  If you don't have the ftape-tools package installed, then you don't
  have the ftmt program; also, the output of the standard mt program
  will look slightly different.












  claus@anaxagoras:ftape-3.x$
  claus@anaxagoras:ftape-3.x$ ftmt -f /dev/qft0 status
  This is a Conner TSM420R/TST800R floppy tape drive, (drive type = 0x000150)
  drive status         = 0x0022d865
  generic drive status = 0x49000000
  (In particular: * at begin of tape * at end of data * tape online * )
  sense key error      = 0x00001b1f
  residue count        = 0
  file number          = 0
  block number         = 0
  MTIOCVOLINFO result:
  file number          = 0
  block size           = 10240
  physical space used  = 118.8 MBytes
  real size of volume  = 0.0 KBytes
  MTIOCGETSIZE result:
  total bytes on tape  = 118.9 MBytes
  total bytes used     = 0.0 KBytes
  total bytes left     = 118.9 MBytes
  claus@anaxagoras:ftape-3.x$




  88..77..  SSyysslloogg eexxaammppllee wwhheenn aacccceessssiinngg ttaappee tthhee ffiirrsstt ttiimmee



       [012]     fdc-io.c (fdc_config) - fdc base: 0x3f0, irq: 6, dma: 2.
       [013]     fdc-io.c (fdc_probe) - Type 82077AA compatible FDC found.
       [014]    ftape-ctl.c (ftape_get_drive_status) - status: new cartridge.
       [015]    ftape-ctl.c (ftape_log_vendor_id) - tape drive type: Conner TSM420R/TST800R.
       [016]    ftape-ctl.c (ftape_init_drive) - Highest FDC supported data rate: 1000 Kbps.
       [017]     ftape-io.c (ftape_set_data_rate) - post QIC-117B drive @ 1000 Kbps.
       [018]     ftape-io.c (ftape_set_data_rate) - 307 ft. QIC-80 tape.
       [019]          ftape-bsm.c (print_bad_sector_map) - 121718 Kb usable on this tape.
       [020]          ftape-bsm.c (print_bad_sector_map) - 24 bad sectors.
       [021]      zftape-read.c (zft_read_header_segments) - Segments written since first format: 16857.
       [022]      zftape-read.c (zft_read_header_segments) - ft_first_data_segment: 2, ft_last_data_segment: 4199.
       [023]   ftape-ctl.c (ftape_disable) - == Non-fatal errors this run: ==.
       [024]   ftape-ctl.c (ftape_disable) - fdc isr statistics:
        id_am_errors     :   0
        id_crc_errors    :   0
        data_am_errors   :   0
        data_crc_errors  :   0
        overrun_errors   :   0
        no_data_errors   :   0
        retries          :   0
       .
       [025]   ftape-ctl.c (ftape_disable) - ecc statistics:
        crc_errors       :   0
        crc_failures     :   0
        ecc_failures     :   0
        sectors corrected:   0
       .
       [026]   ftape-ctl.c (ftape_disable) - tape motion statistics:
       repositions       :   2
       .




  99..  VVFFSS IInntteerrffaaccee aanndd IImmpplleemmeennttaattiioonn NNootteess

  This chapter contains (more or less) detailed implementation nodes for
  _f_t_a_p_e_-_4_._0_4 and list the various changes the file system interface of
  the _f_t_a_p_e driver had to endure while being pushed from version to
  version.


  99..11..  DDeevviicceess pprroovviiddeedd bbyy ffttaappee--44..0044

  99..11..11..  DDeevviiccee nnaammiinngg wwiitthh tthhee ddeevvffss  ffiillee ssyysstteemm

  The Linux kernel (since version 2.3.46) contains support for a virtual
  file system called _d_e_v_f_s which serves to auto-magically create device
  nodes under /dev/ as needed. If the kernel supports devfs then
  _f_t_a_p_e_-_4_._0_4 registers a directory /dev/ftape/ and subdirectories
  /dev/ftape/0/, /dev/ftape/1/, /dev/ftape/2/ and /dev/ftape/3/.


  Using this naming scheme, /dev/qft0 becomes /dev/ftape/0/mt,
  /dev/zqft0 becomes /dev/ftape/0/mtz and finally /dev/rawft0 becomes
  /dev/ftape/0/mtr. Non rewinding devices are indicated by the _s_u_f_f_i_x n
  instead of the _p_r_e_f_i_x n, so /dev/nzqft2 maps to /dev/ftape/2/mtzn.


  99..11..22..  RReewwiinnddiinngg aanndd nnoonn--rreewwiinnddiinngg ddeevviicceess

  It is common usage for Un*x tape device drivers to provide two
  different kinds of tape devices: one that rewinds the tape when the
  device is closed and one that does not. Usually the non-rewinding
  device has an n prefix in front of its name which is otherwise the
  same as for the auto-rewinding device.  The Linux floppy tape device
  driver _f_t_a_p_e follows this convention.


  99..11..22..11..  UUppddaattiinngg ooff hheeaaddeerr sseeggmmeennttss

  Not only that the non-rewinding devices do not rewind the tape when
  the driver is closed, they also ccaacchhee aa lloott ooff ddaattaa wwhhiicchh bbeelloonnggss ttoo
  tthhee hheeaaddeerr sseeggmmeennttss oorr tthhee vvoolluummee ttaabbllee sseeggmmeenntt. This is done because
  synchronising all that data with the data on the tape cartridge would
  mean to rewind the tape to BOT and then write and verify three floppy
  tape segments which would take some minutes.


  However, this caching practice is dangerous as floppy tape drives
  provide no measure to prevent cartridges from being removed from the
  tape drive (there is no door that could be locked) (-- No rule without
  exception: the Iomega Ditto Max drives indeed have load and unload
  commands as well as door locking facilities. _f_t_a_p_e uses them if it
  detects such a tape drive.--)

  .  Therefore one has to be careful with the _f_t_a_p_e driver in the sense
  that one mmuusstt nnoott forget to rewind a cartridge before removing it from
  the tape drive. Use




       mt -f /dev/qft0 rew




  before removing the cartridge; possibly replacing /dev/qft0 by the
  device node you have used when writing to the cartridge used.




  99..11..22..22..  TTaappee mmoottiioonn ccoommmmaannddss

  When using the mt program to send tape motion commands, i.e. commands
  which alter the position of the tape R/W head relative to the tape, it
  doesn't make any sense to use the auto-rewinding devices. The reason
  is simple: auto-rewinding means that the tape is rewound when the tape
  device is closed. However, the tape device is kept open at most for
  the life time of the program which has opened it. This means




       mt -f /dev/qft0 asf 1




  will happily move the tape head to the first file mark, position on
  the EOT side of that file mark (see ``MTFSF'', see ``File marks'') and
  then the mt program is finished. Which means that it closes the tape
  device and as a result the tape is rewound because /dev/qft0 is an
  auto-rewinding device (note the missing n in front of the qft0).


  So you end up with a tape that is located at BOT, and not at the EOT
  side of the first file mark. So, the following would be the correct
  command. Note the n in front of the device name.




       mt -f /dev/nqft0 asf 1




  Tape motion commands are available through the following MTIOCTOP (see
  ``MTIOCTOP'') ioctls. Only ioctls are listed that would move the tape
  head away from BOT (-- Obviously, when sending a tape command that
  causes a rewind operation itself it doesn't matter whether one uses
  the auto-rewinding or non-rewinding devices as in this case one ends
  up with the tape positioned at BOT anyway.--)





     ````MMTTFFSSFF''''


     ````MMTTBBSSFF''''


     ````MMTTFFSSRR''''


     ````MMTTBBSSRR''''


     ````MMTTBBSSFFMM''''


     ````MMTTFFSSFFMM''''



     ````MMTTEEOOMM''''


     ````MMTTSSEEEEKK''''

  99..11..33..  TThhee mmeeaanniinngg ooff tthhee ddiiggiitt ssuuffffiixx ((ddrriivvee sseelleeccttiioonn))

  For each _k_i_n_d of tape device provided by _f_t_a_p_e_-_3_._0_4_d (and later
  versions) there are four different device nodes in the /dev/
  subdirectory which's names only differ in the last letter which is a
  digit between 0 and 3.


  These four different device names come from the fact that it is in
  principle possible to connect four different hardware devices to a
  floppy controller. Often one refers to these hardware devices as _d_r_i_v_e
  _A to _d_r_i_v_e _D. Indeed, when programming the floppy controller, one has
  to address the first floppy drive (_n_o_t floppy tape drive) as _d_r_i_v_e _A,
  the second as _d_r_i_v_e _B. So this is the root of this naming habit.


  For floppy tape drives it normally doesn't matter which drive
  selection (A, B, C or D) one uses to program the floppy controller,
  although there are some drives that have jumpers to configure which
  selection the tape drive expects. So, 0 maps to treating the tape
  drive as drive A and so forth. Normally there is no difference at all
  between those tape devices because the floppy tape drives ignore the
  floppy drive selection method but are woken up by sending special
  commands to the tape drive.


  A notable exception is the Iomega Ditto Max drive, at least when used
  with the Iomega Ditto EZ 4Mbit controller. It refuses to work with
  other drive selections than drive A.


  99..11..44..  DDeevviicceess pprroovviiddeedd bbyy ffttaappee--44..0044

  99..11..44..11..  TTaabbllee ooff ddeevviicceess

  Since _f_t_a_p_e_-_4_._0_4 there are only two device nodes per floppy tape left.
  The q stands for QIC, and the n is a shortcut for _N_o_n-rewinding (see
  ``Rewinding and non-rewinding devices''). Example for drive selection
  method A, see ``Drive selection''):


  device name    bits of minor device number lsb-msb    compr. support    file marks    rewind on close    can read v2.x    raw access ioctls
   /dev/qft0              0|0|0|0|0|0|0|0                    no              yes             yes               yes                 yes
  /dev/nqft0              0|0|1|0|0|0|0|0                    no              yes              no               yes                 yes



                               ``Table 1''

  (``Table 1'')


  The headers of the different columns have the following meaning:




     bits of minor device number

        The minor device number in bitwise representation. The _l_s_b (--
        least significant bit--)
        comes first. See ``zftape devices overview''.



     compression support

        Whether you can use compression with this devices. BBIIGG FFAATT NNOOTTEE::
        _f_t_a_p_e_-_4_._0_4 no longer supports compression. See ``Compression''.
        However, ddeeccoommpprreessssiioonn of compressed archives produced with
        _f_t_a_p_e_-_3_._0_4_d is still possible in order not to break existing
        backup software where a user-level decompression filter would
        not suffice to guarantee compatibility.



     file marks

        Whether this device supports file marks (see ``File marks'', see
        ``MTFSF'', see ``MTBSF'', see ``MTFSFM'', see ``MTBSFM'', see
        ``MTWEOF'').



     rewind on close

        Whether the tape is rewound when this device is closed. Note the
        n in front of all the device names that rewind when closing them
        (see ``Rewinding devices'', see ``MTREW'', see ``MTOFFL'').



     can read v2.x

        Whether you can read tapes produces by the pre-3.04 _s_f_t_a_p_e
        driver or by the old _f_t_a_p_e_-_2_._x driver. See ``Compatibility with
        <em>ftape-2.x</em>''.



     raw access ioctls

        Whether this device supports raw access ioctls (see
        ``MTIOCRDFTSEG and MTIOCWRFTSEG''). Please note that since
        there is a new ioctl which switches raw mode on and off. See
        ``MTIOCFTMODE''.


  Please refer to the respective subsections for more remarks about the
  different devices (see ``/dev/qft'', see ``/dev/rft'', see
  ``/dev/rawft'').


  There is a script [/usr/src/ftape-4.04/]scripts/MAKEDEV.ftape
  <MAKEDEV.ftape> that can produce these devices for you. See
  ``Installing ftape''. You find it under
  [/usr/src/ftape-4.04/]scripts/. The devices which I called /dev/qft*
  and /dev/nqft* were also used by the original _f_t_a_p_e driver. In the
  latest versions of the original _f_t_a_p_e_-_2_._x driver they were called
  /dev/rft* and /dev/nrft*, older versions of _f_t_a_p_e called them
  /dev/ftape and /dev/nftape. See ``Installing ftape''.


  99..11..44..22..  OOvveerrvviieeww

  To support some new features, I added new flag bits to the minor
  device number. These are (see
  [/usr/src/ftape-4.04/]include/linux/zftape.h <zftape.h>) (-- The
  meaning of the ZFTAPE_Q80_MODE bit has changed from version 1.02 to
  version 1.03. To be more precise, this bit is meaningless now, it is
  just kept for compatibility reasons.--)

  :




       #define ZFTAPE_Q80_MODE    8 (= bit 3)
       #define ZFTAPE_RAW_MODE   32 (= bit 5)




  Already present in Bas Laarhoven's original _f_t_a_p_e was bit 2,
  indicating the non-rewind mode (see ``Rewinding and non-rewinding
  devices'') of the driver, and the meaning of the first two bits that
  indicate the drive selection mode.See ``Drive selection''.


  There used to be another bit, namely




       #define ZFTAPE_ZIP_MODE   16 (= bit 4)




  This bit of the minor device number used to switch-on _f_t_a_p_e_-_3_._0_4_d's
  user-transparent compression feature (or _b_u_g). _f_t_a_p_e_-_4_._0_4 still
  understands this bit, but doesn't support writing of compressed
  archives any more; however, ddeeccoommpprreessssiioonn of compressed archives
  produced by _f_t_a_p_e_-_3_._0_4_d is still supported. Consequently, the
  _f_t_a_p_e_-_4_._0_4 treats the tape cartridge as write protected when used with
  a device node with this bit set (i.e. /dev/zqft0, /dev/nzqft0 etc.).


  The actual minor-device number is simply computed by a bitwise or of
  the bits that correspond to the desired features.  A non rewinding
  device for example has the following minor device number (drive
  selection method A):




         FTAPE_NO_REWIND | ZFTAPE_SELECT_A
       =        4        |         0
       = 0x04 = 4




  Consequently, there are 16 different _f_t_a_p_e devices.


  And, if you also count the obsolete devices /dev/[n]zqft0, ...,
  /dev/[n]zqft0, eight additional device-nodes which are only kept in
  order not to break compatibility with older versions of the _f_t_a_p_e
  driver.



  99..11..44..33..  //ddeevv//qqfftt** ,, //ddeevv//nnqqfftt**

  When used with these tape devices the driver emulates file marks using
  a volume-table segment according to the _Q_I_C_-_1_1_3 standard (QIC
  organisations home page <http://www.qic.org>).


  Note: the driver automatically recognises tapes with the Linux raw
  format V* label and denies any write access to such tapes _u_n_l_e_s_s the
  tape is located at BOT. One also may use




       mt -f /dev/qft0 erase




  which will damage the data on such tapes (well, at least the first
  data segment which is zeroed to be used as volume-table).  Anyhow, old
  _f_t_a_p_e_-_2_._x tapes still can be read, and one also has complete file mark
  support ffoorr rreeaaddiinngg.


  99..11..44..44..  //ddeevv//rrfftt** ,, //ddeevv//nnrrfftt**

  There were only eight device nodes provided by the _f_t_a_p_e_-_2_._x resp.
  _s_f_t_a_p_e driver VFS front-end. These were /dev/rft0 to /dev/rft3 and
  /dev/nrft0 to /dev/nrft3. The minor device number of theses devices
  codes for the rewinding/non-rewinding (see ``Rewinding and non-
  rewinding devices'') mode and the drive selection method (see ``Drive
  selection'') only.


  For _f_t_a_p_e_-_4_._0_4 these are synonymous to /dev/qft* and /dev/nqft* which
  use the same major and minor device numbers. The shell script
  [/usr/src/ftape-4.04/]scripts/MAKEDEV.ftape <MAKEDEV.ftape> creates
  the former as symlinks to /dev/qft* and /dev/nqft* (see ``Installing
  ftape'') for compatibility reasons.


  99..11..44..55..  //ddeevv//zzqqfftt** ,, //ddeevv//nnzzqqfftt**

  _f_t_a_p_e_-_4_._0_4 nnoo lloonnggeerr ssuuppppoorrttss aauuttoommaattiicc ccoommpprreessssiioonn wwiitthh tthhee lzrw3
  algorithm. See ``Compatibility with <em>ftape-3.04d</em>''.


  However, ddeeccoommpprreessssiioonn of archives produced with _f_t_a_p_e_-_3_._0_4_d (and
  earlier versions) is still supported in order to preserve
  compatibility with existing backups.


  When the _f_t_a_p_e_-_4_._0_4 driver is used with these device nodes, it treats
  the cartridge as write protected, as wwrriittiinngg of compressed volumes is
  nnoo lloonnggeerr ssuuppppoorrtteedd.


  99..11..44..66..  //ddeevv//rraawwfftt** ,, //ddeevv//nnrraawwfftt**

  Please note that the MTIOCFTMODE (see ``MTIOCFTMODE'') ioctl has
  obsoleted the use of these devices since _f_t_a_p_e_-_4_._0_3.




  99..22..  CCoommppaattiibbiilliittyy wwiitthh ffttaappee--22..xx

  99..22..11..  RReeaadd oonnllyy ssuuppppoorrtt ffoorr ffttaappee--22..xx

  Except when using the driver in raw mode -- i.e. after issuing the
  MTIOCFTMODE ioctl (see ``MTIOCFTMODE'') or when using the driver with
  the raw devices /dev/(n)rawft* -- the driver detects tapes that were
  already used by the original _f_t_a_p_e_-_2_._x driver and the _s_f_t_a_p_e driver
  from pre-3.04 _f_t_a_p_e distributions, i.e. tapes that have the Linux raw
  format V* label written to the header segments (-- The first 58
  kilobytes of a tape cartridge are used to store status information
  about the tape cartridge and are referred to as _h_e_a_d_e_r _s_e_g_m_e_n_t_s.--)

  .


  The driver then switches to read-only mode to prevent the recorded
  data to be overwritten. This is necessary even if the tape is not full
  because _f_t_a_p_e_-_4_._0_4 uses the third segment on tape for a volume table,
  according to the QIC-113 standard (QIC organisations home page
  <http://www.qic.org>).


  Thus allowing write access to tapes already used by the original
  _f_t_a_p_e_-_2_._x or _s_f_t_a_p_e could result in the damage of the data of the
  first segment and therefore I imagined it a good idea to disable write
  access to those tapes. This over-write protection is ignored when the
  tape is positioned at begin of tape (referred to as _B_O_T) in which case
  the tape label and the original file marks are silently overwritten.


  99..22..22..  CChhaannggeedd MMTTBBSSFF  aanndd EEOODD  sseemmaannttiiccss

  _f_t_a_p_e_-_3_._0_4_d (and later versions) allow read access to _f_t_a_p_e_-_2_._x
  created backups and also provides full file-mark support: one still
  can use the MTFSF, MTBSF and related tape operations. See ``MTFSF'',
  see ``MTBSF''.


  However, _f_t_a_p_e_-_2_._x handled the MTBSF command wrongly: MTBSF with count
  1 backspaced to the previous volume, but it should not, IMHO. The
  correct behaviour (or to express it a little more carefully: the
  behaviour implemented in _f_t_a_p_e_-_3_._0_4_d (and later versions)) is
  described in the MTBSF section of this manual. See ``MTBSF''.


  The handling of the the EOD (End Of Data) mark might also have changed
  slightly (not sure, FIXME). The current implementation returns a zero
  byte count for two consecutive reads when EOD is reached. If the
  program trying to read from the tape drive places additional
  consecutive read requests, then an IO error (error code -EIO) is the
  result.


  99..33..  CCoommppaattiibbiilliittyy wwiitthh ffttaappee--33..0044dd

  From the user's point of view there is a single -- possibly severe --
  compatibility problem w.r.t. _f_t_a_p_e_-_3_._0_4_d:


  TThhee ccoommpprreessssiioonn ssuuppppoorrtt hhaass vvaanniisshheedd!!


  WWhhyy tthhee hheellll?? Well, _f_t_a_p_e_-_4_._0_4 adds a major new feature to the _f_t_a_p_e
  driver (besides supporting additional hardware):

  _f_t_a_p_e_-_4_._0_4 ccoommeess wwiitthh hhaarrdd wwrriittee eerrrroorr rreeccoovveerryy!!


  But why does this new feature require that zftape's compression
  facility vanishes I hear you shout. Well. I thought about it several
  hours and gave up. Implementing hard write error recovery would have
  been vveerryy hard if I had kept the compression support.


  However, ccaallmm ddoowwnn!!. You still can read your old compressed archives
  produced by _f_t_a_p_e_-_3_._0_4_d and earlier versions with _f_t_a_p_e_-_4_._0_4.
  DDeeccoommpprreessssiioonn of compressed archives is still supported for
  compatibility reasons.


  If you need to compress your archives get a backup program with
  support for compression. DDoo nnoott uussee tar -czf /dev/qft0. A single wrong
  byte in the compressed archive will make it almost impossible to
  recover your data. Instead, get a decent backup software with support
  for compression. Refer to the Ftape home page
  <http://www.instmath.rwth-aachen.de/~heine/ftape> for some examples.


  So, what is hard write error recovery? Here a write error refers to a
  write error detected by the FDC during data transfer to the tape
  (there might be other errors which aren't recognised by the FDC ...).
  All _f_t_a_p_e versions prior to _f_t_a_p_e_-_4_._0_4 retried several time when such
  an error was detected. If the data still couldn't be written
  successfully after a given number of retries, such an error was marked
  hard. However, this was the end of story for _f_t_a_p_e_-_2_._x and
  _f_t_a_p_e_-_3_._0_4_d.


  AAfftteerr rreettrryyiinngg sseevveerraall ttiimmeess tthhee wwrriittee eerrrroorr ssiimmppllyy wwaass iiggnnoorreedd!!


  _f_t_a_p_e_-_4_._0_4 introduces a mmaajjoorr change: if there are hard write errors
  in the above sense, then the sector (-- data entity of 1024 bytes--)

  is marked as bad in the bad sector map (-- a region of the header
  segments where media defects are recorded--)

  and is skipped and _f_t_a_p_e_-_4_._0_4 continues writing behind the bad sector.


  However, in order to keep the tape streaming the _f_t_a_p_e driver caches
  up to three floppy tape segments (-- data entities of 32 sectors, 29
  data, 3 _E_C_C (Error Correction Code)--)

  . This means, if there is a hard write error then _f_t_a_p_e needs to shift
  the data around cycling some sectors through its cache.


  And this is the reason for dropping the compression feature (or bug).
  The layout of the compressed data that _f_t_a_p_e_-_3_._0_4_d stored on the tape
  depended on the segment layout of the tape. As floppy tape segments
  have varying size caused by bad sectors, this introduces several
  complications when additional bad sectors are detected by _f_t_a_p_e.


  Of course, keeping the compression support would have been possible,
  but complicated.




  99..44..  CCoommppaattiibbiilliittyy wwiitthh ffttaappee--44..0022

  99..44..11..  TTaappee bblloocckk aaddddrreessssiinngg

  When using _f_t_a_p_e_-_3_._0_4_d and later versions up to _f_t_a_p_e_-_4_._0_2
  (inclusively) seeking always stays within the same volume, and the
  block address is relative to the start of the current volume. This is
  incompatible with the way SCSI drives implement this command where the
  block address is relative to the beginning of the tape. This has been
  fixed in _f_t_a_p_e_-_4_._0_3.


  The following tape ioctls have changed between _f_t_a_p_e_-_4_._0_2 and
  _f_t_a_p_e_-_4_._0_4 as a result of the changed tape block address handling:




     ````MMTTFFSSRR''''


     ````MMTTBBSSRR''''


     ````MMTTSSEEEEKK''''


     ````MMTTTTEELLLL''''


     ````MMTTIIOOCCPPOOSS''''


     ````MMTTIIOOCCGGEETT''''

  Note that each file mark counts as a single tape block. So sending a
  MTFSR with count 1 when positioned right before a file mark will
  position right at the start of the following volume.


  99..44..22..  RRaaww aacccceessss mmooddee

  Since _f_t_a_p_e_-_4_._0_3 the devices /dev/rawft* have been obsoleted by the
  MTIOCFTMODE (see ``MTIOCFTMODE'') ioctl. However, the device minor
  bits are still decoded by the driver for backwards compatibility.


  99..55..  FFiillee mmaarrkkss

  99..55..11..  FFiillee mmaarrkk iimmpplleemmeennttaattiioonn wwiitthh ffttaappee--22..xx

  This was Bas Laarhoven's original comment in the file ftape-eof.c of
  the _f_t_a_p_e_-_2_._x distribution. _f_t_a_p_e_-_4_._0_4 doesn't use this technique any
  more; Bas' comment is included for reference only (-- Note that the
  _s_f_t_a_p_e module has vanished from the _f_t_a_p_e distribution since version
  3.04. This section is here merely to explain the differences between
  _f_t_a_p_e_-_2_._x and _f_t_a_p_e_-_3_._0_4_d and later--)




       Ftape (mis-)uses the bad sector log to record end-of-file
       marks.  Initially (when the tape is erased) all entries in
       the bad sector log are added to the tape's bad sector map.
       The bad sector log then is cleared.

       The bad sector log normally contains entries of the form:
       even 16-bit word: segment number of bad sector odd 16-bit
       word: encoded date There can be a total of 448 entries (1792
       bytes).



       my guess is that no program is using this bad sector log
       (the format seems useless as there is no indication of the
       bad sector itself, only the segment) However, if any program
       does use the bad sector log, the format used by _f_t_a_p_e_-_2_._x
       will let the program think there are some bad sectors and no
       harm is done.



       The eof mark entries that _f_t_a_p_e_-_2_._x stores in the bad sector
       log: even 16-bit word: segment number of eof mark odd 16-bit
       word: sector number of eof mark [1..32]



       The eof_map as maintained is a sorted list of eof mark
       entries.



       The tape name field in the header segments is used to store
       a Linux tape identification string and a version number.
       This way the tape can be recognised as a Linux raw format
       tape when using tools under other OS's.



       anymore. That space is used for the (longer) bad sector map
       that now is a variable length list too.  We now store our
       end-of-file marker list after the bad-sector-map on tape.
       The list is delimited by a (__u32) 0 entry.


  Obviously the setup described above fails with tape cartridges with
  more than 65536 segments. But this wasn't the reason why I dropped it
  if I remember right.


  99..55..22..  FFiillee mmaarrkk iimmpplleemmeennttaattiioonn wwiitthh ffttaappee--33..0044dd  aanndd bbeeyyoonndd

  A major change in _f_t_a_p_e_-_3_._0_4_d compared with the former _f_t_a_p_e_-_2_._x and
  the _s_f_t_a_p_e driver from pre-3.04 _f_t_a_p_e distributions is the use of a
  volume-table segment as specified in the _Q_I_C_-_8_0_/_3_0_1_0_/_3_0_2_0 and _Q_I_C_-_1_1_3
  development standards (QIC organisations home page
  <http://www.qic.org>). The driver doesn't use the failed sector log
  any more for file mark emulation but produces a volume table entry for
  each file written to tape.


  The drawback of this approach is that there is a limit on the maximum
  number of file marks available per cartridge. Each file marks consumes
  128 bytes in the volume table segment, the volume table segment has a
  size of 29k which yields a maximum number of 232 file marks. The
  volume table overflow extension as proposed by various qic standards
  (see QIC organisations home page <http://www.qic.org>) is nnoott
  supported by ftape.



  The portions of the tape that are occupied by data written with
  _f_t_a_p_e_-_4_._0_4 can be recognised by other programs that conform to those
  _Q_I_C standards (think for example of the software that was shipped with
  your tape drive). One can test this by doing a backup with _f_t_a_p_e_-_4_._0_4
  (using the /dev/qft* devices, see ``zftape devices'') and then use the
  software that came with your tape drive (you probably have to reboot
  to do this) and try to have a look at the volume table of the tape.
  There should be entries containing volume labels like




       zftape volume 004




  However, you will recognise that the time stamp that will be shown by
  such a program either makes no sense at all or is really out of date.
  See Vtblc (info file ftape-tools).


  Note: it is still possible to read tapes that were written with the
  original _f_t_a_p_e_-_2_._x driver and the _s_f_t_a_p_e driver from pre-3.04 _f_t_a_p_e
  distributions. _f_t_a_p_e_-_4_._0_4 does accomplish this by emulating a volume
  table. But write access to the tape is denied until you erase it which
  damages the data on the tape, of course. See ``Compatibility with
  <em>ftape-2.x</em>''.


  99..55..33..  FFiillee mmaarrkkss aanndd ttaarr

  There is at least one peculiarity when using the tar program with tape
  devices. The problem is, that tar writes its own kind-of _e_n_d _o_f _f_i_l_e
  (EOF) mark to the tape. This EOF mark consists simply of one or more
  zeroed _t_a_r _r_e_c_o_r_d_s (data entities of 512 bytes). tar stops reading
  back a backup volume as soon as it finds such a zeroed record. But
  this also means that tar never reads in the file mark provided by the
  tape device. This has an effect when extracting more than one volume
  from a tape cartridge: after tar has completed extracting the first
  one, one needs to use an mt -f /dev/tape fsf to skip to the next
  volume (where one has to replace /dev/tape by the tape device one
  actually uses).


  Just to make it clear: this is totally unrelated to _f_t_a_p_e but a
  feature of tar. The same applies to all kinds of tape devices
  available for Linux.


  99..66..  TTaappee bblloocckkss

  The first changes I made to _f_t_a_p_e were to implement an emulation of
  tape blocks of a fixed length to allow support for the block seek
  commands MTFSR, MTBSR and MTSEEK (see ``MTIOCTOP'').  These commands
  allow for skipping of damaged tape sections and for fast (well, still
  slow enough) skipping inside a backup volume and are important for
  skipping bad spots on tape cartridges.  The floppy tape segments are
  not suitable for this purpose because they have varying length due to
  bad sectors.


  I regard a fixed block-size as a feature, but on the other hand there
  are some thing to take into account:


  +o  _f_t_a_p_e_-_4_._0_4 requires every read and write attempt to be a multiple
     of the given block size. Every attempt to call write() or read()
     with other buffer sizes result in an _-_E_I_N_V_A_L error.  Thus one
     cannot simply do a cat > /dev/qft0 and then type some blurb on the
     console.

  +o  _f_t_a_p_e_-_4_._0_4 supports the MTSETBLK command (see ``MTSETBLK''). If one
     really wants one can put the driver into _v_a_r_i_a_b_l_e _b_l_o_c_k _s_i_z_e mode
     using the mt program using a block size of 0:




       mt -f /dev/qft0 setblk 0




  Note that this leads to a maybe wrong behaviour of the MTSEEK, MTFSR
  and MTBSR operations: they no longer skip tape records but interpret
  their argument as a byte count. The same holds for the MTIOCPOS
  command: it reports the tape position (relative to the start of the
  current volume) in _b_y_t_e_s.


  +o  Why don't use a variable block size all the time?


     Well, this is the relict of _f_t_a_p_e_-_3_._0_4_d's builtin compression
     support. See ftape-3.04d's builtin compression (info file ftape).


  +o  There is a special ioctl, MTIOCVOLINFO, which returns the block
     size of the volume the driver is currently located at together with
     some other maybe useful information. See ``MTIOCVOLINFO''.


  99..77..  BBuuiillttiinn CCoommpprreessssiioonn

  _f_t_a_p_e_-_4_._0_4 introduces a major incompatibility w.r.t. to backup sets
  written bye _f_t_a_p_e_-_3_._0_4_d. The compression support has vanished.  See
  ftape-3.04d's builtin compression (info file ftape). See ``ftape-3x
  compatibility''.


  You still shouldn't use tar -czf ... to produce compressed backup sets
  as tar compresses the entire archive as a single byte stream; a single
  clobbered byte at the beginning of the data stream make it almost
  impossible to recover the remainder of the archive.


  Use a more elaborate backup system instead. The


  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>


  contains some links.


  NNoottee:: Decompression of compressed archives written by _f_t_a_p_e_-_3_._0_4_d and
  earlier versions is still supported.




  99..88..  TThhee iiooccttll iinntteerrffaaccee ttoo ffttaappee

  So called _i_o_c_t_l's are special IO-commands that can be send to a file
  via the ioctl system call (see man 2 ioctl). A device driver can
  supply arbitrary IO operations via its ioctl interface. However, most
  commonly ioctls are used to perform special task that aren't related
  to writing or reading (e.g. see ``MTIOCTOP'') or to modify the
  behaviour of a device driver by setting specific options (e.g. see
  ``MTSETBLK'').


  This section describes which ioctls are available with _f_t_a_p_e. The
  ioctl definitions can be found in the file [/usr/src/linux/]mtio.h or
  in _f_t_a_p_e's own version of this file
  [/usr/src/ftape-4.04/]/include/linux/mtio.h <mtio.h>.


  99..88..11..  TThhee ttaappee ooppeerraattiioonn wwrraappppeerr iiooccttll MMTTIIOOCCTTOOPP

  The MTIOCTOP ioctl provides control over various tape operations.  The
  following list may be incomplete and covers at most those operations
  that are supported by _f_t_a_p_e_-_4_._0_4. Please refer also to the file
  /usr/include/sys/mtio.h. Most of the operations below can be sent to a
  tape device using the mt program. There is probably a version of this
  program installed on your computer already, however, there is a
  modified version of the GNU mt program contained in the ftape-tools
  package (-- You can download the ftape-tools package from the
  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  or from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  . Please refer also to the manual page of the mt program (man 1 mt) or
  to the documentation contained in the ftape-tools package in case you
  are using. See Ftmt (info file ftape-tools).


  Some tape operations take an optional numerical argument which
  defaults to 1 when using the mt program. Each of the explanations
  below contains a (very short) example how to use the mt program to
  send the command to the drive.


  99..88..11..11..  MMTTRREESSEETT



     C code



          struct mtop op = { MTRESET, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Resets the tape drive (the hardware) and resets the kernel
        driver (the software) to a definite initial state as if the
        cartridge has been newly inserted. Loads the tape if  that is
        supported by the tape drive.




     _N_o_t_e_s

        BBee ccaarreeffuull:: resetting the driver simulates insertion of a new
        cartridge, so the driver forgets about unflushed write buffers
        and the values of all internal variables (i.e. resets them to
        initial values). Please read the section about rewinding and
        non-rewinding tape devices. See ``Rewinding devices''.


        For _f_t_a_p_e_-_3_._0_4_d (and later versions) a MTRESET command also puts
        the drive _o_n_l_i_n_e, i.e. reverses the MTOFFL command. This was not
        the case with _f_t_a_p_e_-_2_._x. See ``MTOFFL''.


        If you have used the MTLOCK command with an Iomega Ditto Max
        tape drive, then the door lock is cleared by MTRESET.


        The difference between a MTRESET command and a MTLOAD command is
        that the MTLOAD command doesn't reset the hardware, and is a no-
        op when issued while a cartridge is loaded and the drive hasn't
        been put offline with MTOFFL.



     _E_x_a_m_p_l_e



          mt -f /dev/qft0 reset





     _R_e_f_e_r_e_n_c_e_s



        ````RReewwiinnddiinngg ddeevviicceess''''..


        ````MMTTRREEWW''''..


        ````MMTTOOFFFFLL''''..


        ````MMTTLLOOAADD''''..


        ````MMTTUUNNLLOOAADD''''..

  99..88..11..22..  MMTTFFSSFF



     C code



          struct mtop op = { MTFSF, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);



     _D_e_s_c_r_i_p_t_i_o_n

        Forward space over COUNT file marks. The tape is positioned at
        the EOT (_E_n_d _O_f _T_a_p_e) side of the file mark.



     _N_o_t_e_s

        You need to use the non-rewinding devices when using this with
        the mt program, see ``Rewinding devices and tape motion
        commands''.



     _E_x_a_m_p_l_e

        Skip over COUNT file marks




          mt -f /dev/nqft0 fsf COUNT




     COUNT set to 5:




          mt -f /dev/nqft0 fsf 5





     _R_e_f_e_r_e_n_c_e_s



        ````FFiillee mmaarrkkss''''..


        ````MMTTBBSSFF''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTFFSSFFMM''''..


        ````MMTTBBSSFFMM''''..


        ````MMTTWWEEOOFF''''..

  99..88..11..33..  MMTTBBSSFF



     C code


     struct mtop op = { MTBSF, COUNT };
     result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Backward space over COUNT file marks.  The tape is positioned at
        at the EOT (_E_n_d _O_f _T_a_p_e) side of the last skipped file mark.



     _C_a_v_e_a_t_s

        Note that mt -f /dev/qft0 bsf (i.e. COUNT set to 1) always stays
        within the same tape volume and has the effect to position the
        tape at the beginning of the current volume which is exactly
        what should happen if one skips over the previous file mark and
        positions at the EOT side of it. Think about it!


        This might differ from the original behaviour of _f_t_a_p_e_-_2_._x or
        _s_f_t_a_p_e, but is the expected behaviour of a Un*x tape device.
        See ``Changed <tt>MTBSF</tt> and <tt>EOM</tt> semantics''.



     _N_o_t_e_s

        You need to use the non-rewinding devices when using this with
        the mt program, see ``Rewinding devices and tape motion
        commands''.



     _E_x_a_m_p_l_e

        Space to the beginning of the previous file. CCOOUUNNTT hhaass ttoo bbee sseett
        ttoo 2 to accomplish this.




          mt -f /dev/nqft0 bsf 2





     _R_e_f_e_r_e_n_c_e_s



        ````FFiillee mmaarrkkss''''..


        ````MMTTFFSSFF''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTFFSSFFMM''''..

        ````MMTTBBSSFFMM''''..


        ````MMTTWWEEOOFF''''..

  99..88..11..44..  MMTTFFSSRR



     C code



          struct mtop op = { MTFSR, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Forward space over COUNT tape blocks (block-size is set via
        MTSETBLK, see ``MTSETBLK'')



     _N_o_t_e_s


     +o  _f_t_a_p_e_-_4_._0_4 emulates blocks of a constant length. That is, MTFSR
        and MTBSR don't skip floppy tape segments but blocks of a
        virtual size between 1 kb and 62 kb depending on what was
        specified with MTSETBLK (see ``MTSETBLK'').

     +o  One needs to use the non-rewinding devices when using this with
        the mt program. See ``Rewinding devices and tape motion
        commands''.

     +o  MTSEEK just modifies a variable and does not result in tape
        motion.



     _C_o_m_p_a_t_i_b_i_l_i_t_y


     +o  When using _f_t_a_p_e_-_3_._0_4_d and later versions up to _f_t_a_p_e_-_4_._0_2
        neither MTFSR nor MTBSR can skip over file marks. An attempt to
        do so will result in an -EIO error code. This is different with
        SCSI tapes and has been fixed in _f_t_a_p_e_-_4_._0_3.

     +o  In variable block size mode the argument is interpreted as the
        desired position measured in _b_y_t_e_s. Maybe this is a bug.

     +o  _f_t_a_p_e_-_2_._x resp. _s_f_t_a_p_e didn't really implement this command.
        _f_t_a_p_e_-_2_._x used this to let you you change the trace level by
        specifying the trace level as argument to this command whereas
        _f_t_a_p_e_-_3_._0_4_d (and later versions) uses for this the command
        MTSETDENSITY (see ``MTSETDENSITY'') because this will definitely
        never be used for real tape operations supported by _f_t_a_p_e_-_3_._0_4_d
        (and later versions).




     _E_x_a_m_p_l_e

        COUNT set to 5, i.e. skip over 5 tape blocks with _f_t_a_p_e_-_3_._0_4_d
        (and later versions):




          mt -f /dev/nqft0 fsr 5





     _R_e_f_e_r_e_n_c_e_s



        ````MMTTBBSSRR''''..


        ````MMTTSSEEEEKK''''..


        ````MMTTSSEETTBBLLKK''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTSSEETTDDEENNSSIITTYY''''..


        ````CCoonnffiigguurree ffttaappee''''..

  99..88..11..55..  MMTTBBSSRR



     C code



          struct mtop op = { MTBSR, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Backward space over COUNT tape blocks (block-size is set via
        MTSETBLK, See ``MTSETBLK'').



     _N_o_t_e_s

        See ``MTFSR''.



     _C_o_m_p_a_t_i_b_i_l_i_t_y

        MTBSR was unimplemented for _f_t_a_p_e_-_2_._x resp. _s_f_t_a_p_e. For more
        information. See ``MTFSR''.



     _E_x_a_m_p_l_e

        COUNT set to 5, i.e. skip backwards over 5 tape blocks with
        _f_t_a_p_e_-_3_._0_4_d (and later versions):




          mt -f /dev/nqft0 bsr 5





     _R_e_f_e_r_e_n_c_e_s



        ````MMTTFFSSRR''''..


        ````MMTTSSEEEEKK''''..


        ````MMTTSSEETTBBLLKK''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..

  99..88..11..66..  MMTTWWEEOOFF



     C code



          struct mtop op = { MTWEOF, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Write COUNT file marks at the current position. For _f_t_a_p_e_-_3_._0_4_d
        (and later versions) this command is iilllleeggaall -- as is all write
        access to the tape -- uunnlleessss the tape is located at either BOT
        (_B_e_g_i_n _O_f _T_a_p_e) or EOD (_E_n_d _O_f _D_a_t_a, end of area that already is
        occupied by data).



     _N_o_t_e_s

        The MTWEOF ioctl is interpreted by _f_t_a_p_e_-_3_._0_4_d (and later
        versions) as follows:


        A volume table entry is created that covers all of the data from
        the end of the previous volume or BOT (if the tape is empty) up
        to the current position. If nothing has been written, then a
        volume table entry for a zero-size volume is created.


        If COUNT is greater than 1 then COUNT - 1 additional zero-size
        volume table entries are created.



     _C_a_v_e_a_t_s

        Note that MTWEOF is pretty useless when used with mt because the
        _f_t_a_p_e_-_3_._0_4_d (and later versions) driver automatically inserts a
        file mark when closing the device. Therefore all of the examples
        below will do nothing but insert empty volumes. Note that each
        empty volume -- although nothing is recorded -- consumes 29k of
        tape space.



     _L_i_m_i_t_a_t_i_o_n_s

        There is a limit of the maximum available number of file marks
        per cartridge. Each file marks consumes 128 bytes in the volume
        table segment, the volume table segment has a size of 29k which
        yields a maximum number of 232 file marks. The volume table
        overflow extension as proposed by various qic standards (see QIC
        organisations home page <http://www.qic.org>) is _n_o_t supported
        by ftape.



     _B_u_g_s

        When using MTWEOF right before closing the driver then
        _f_t_a_p_e_-_3_._0_4_d (and later versions) will _n_o_t insert a second file
        mark unless something has been written to the tape after the
        last MTWEOF. I don't know if this is a bug.



     _E_x_a_m_p_l_e

        COUNT set to 1, i.e. write a single file mark:




          mt -f /dev/nqft0 weof 1




     or equivalently (since COUNT has the value 1)




          mt -f /dev/nqft0 weof





     _R_e_f_e_r_e_n_c_e_s

        ````FFiillee mmaarrkkss''''..


        ````MMTTFFSSFF''''..


        ````MMTTBBSSFF''''..


        ````MMTTFFSSFFMM''''..


        ````MMTTBBSSFFMM''''..

  99..88..11..77..  MMTTRREEWW



     C code



          struct mtop op = { MTREW, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Rewinds the tape cartridge, results also in updating of the
        header segments if necessary.



     _N_o_t_e_s

        OOnnee aallwwaayyss sshhoouulldd uussee eeiitthheerr tthhiiss ccoommmmaanndd oorr MTOFFL (see
        ``MTOFFL'') before removing the tape cartridge from the tape
        drive.


        Updating of the header segments may take some time.



     _E_x_a_m_p_l_e



          mt -f /dev/nqft0 rewind





     _R_e_f_e_r_e_n_c_e_s



        ````RReewwiinnddiinngg ddeevviicceess''''..


        ````MMTTOOFFFFLL''''..

  99..88..11..88..  MMTTOOFFFFLL



     C code



          struct mtop op = { MTOFFL, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Rewind the tape cartridge and put the drive off-line. This
        should result in ejecting the tape cartridge.



     _N_o_t_e_s

        MTOFFL always results in updating of the header segments if
        necessary.



     _L_i_m_i_t_a_t_i_o_n_s

        The Iomega Ditto Max tape drive is the only floppy tape drive I
        know of that supports ejecting the cartridge. All others don't.
        Therefore _f_t_a_p_e_-_3_._0_4_d (and later versions) (as did _f_t_a_p_e_-_2_._x and
        _s_f_t_a_p_e) implement this command as a soft eject in the sense that
        the driver rejects any further operation with the exception of a
        MTRESET and a MTLOAD command. MTIOCGET will be still accepted
        and tell the caller that the drive is offline.



     _E_x_a_m_p_l_e



          mt -f /dev/nqft0 offl




     or equivalently




          mt -f /dev/nqft0 rewoffl





     _R_e_f_e_r_e_n_c_e_s




        ````MMTTRREESSEETT''''..


        ````MMTTLLOOAADD''''..


        ````MMTTUUNNLLOOAADD''''..


        ````MMTTRREEWW''''..


        ````RReewwiinnddiinngg ddeevviicceess''''..

  99..88..11..99..  MMTTNNOOPP



     C code



          struct mtop op = { MTNOP, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        No operation. This command is supposed to set the tape status
        only (to be read with MTIOCGET, see ``Query the tape status'').



     _N_o_t_e_s

        For _f_t_a_p_e_-_3_._0_4_d (and later versions) this results in reading the
        header segments if this hasn't been done already and otherwise
        flushes the write buffers to tape (unless the driver is off-
        line, see ``MTOFFL''). This was a real no-op for _f_t_a_p_e_-_2_._x resp.
        _s_f_t_a_p_e.



     _E_x_a_m_p_l_e

        This command cannot be issued alone by the mt program but a mt
        status results in sending the MTNOP command to the drive before
        reading the tape status with MTIOCGET




          mt -f /dev/nqft0 status





     _R_e_f_e_r_e_n_c_e_s




        ````MMTTIIOOCCGGEETT''''..


        ````MMTTOOFFFFLL''''..

  99..88..11..1100..  MMTTRREETTEENN



     C code



          struct mtop op = { MTRETEN, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Retension the tape, i.e. forward space to end of tape and
        rewind.



     _N_o_t_e_s

        PPLLEEAASSEE NNOOTTEE TTHHEE FFOOLLLLOOWWIINNGG::


        Floppy tape cartridges are ppaarrttiiccuullaarrllyy sensitive to stretch,
        aallwwaayyss use this command at least once before writing to a new
        cartridge to pre-stretch it.


        The following is taken from the Seagate TST3200 Installation
        manual:



          Retention tape cartridges that have not been used for
          more than a month before restoring or backing up data.
          This retentioning removes unwanted tight spots that
          develop naturally on reeled media.



     _E_x_a_m_p_l_e



          mt -f /dev/nqft0 reten




  99..88..11..1111..  MMTTBBSSFFMM



     C code



     struct mtop op = { MTBSFM, COUNT };
     result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Backward space over COUNT file marks.  The tape is positioned at
        the the BOT (_B_e_g_i_n _O_f _T_a_p_e) side of the last skipped file mark.



     _N_o_t_e_s

        mt -f /dev/qft0 bsfm (i.e. COUNT set to 1) positions at the end
        of the previous volume which indeed is just was position at the
        BOT side of the last skipped file mark means if only one file
        mark has been skipped.



     _L_i_m_i_t_a_t_i_o_n_s

        With _f_t_a_p_e_-_3_._0_4_d (and later versions) it is nevertheless
        impossible to use MTBSFM to append data to a tape volume. Since
        version 3.03 all write access to the tape is iilllleeggaall uunnlleessss the
        tape is located at either BOT (_B_e_g_i_n _O_f _T_a_p_e) or EOD (_E_n_d _O_f
        _D_a_t_a, end of the area that already is occupied by data). _E_O_D is
        defined to be the location aafftteerr the last file mark.



     _E_x_a_m_p_l_e

        skip to end of the previous tape volume




          mt -f /dev/nqft0 bsfm





     _R_e_f_e_r_e_n_c_e_s



        ````FFiillee mmaarrkkss''''..


        ````MMTTFFSSFFMM''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTFFSSFF''''..


        ````MMTTBBSSFF''''..


        ````MMTTWWEEOOFF''''..

  99..88..11..1122..  MMTTFFSSFFMM



     C code



          struct mtop op = { MTFSFM, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Forward space over COUNT file marks.  The tape is positioned at
        the the BOT (_B_e_g_i_n _O_f _T_a_p_e) side of the last skipped file mark.



     _N_o_t_e_s

        mt -f /dev/qft0 fsfm (i.e. COUNT set to 1) positions at the end
        of the current volume which indeed is just what position at the
        BOT side of the last skipped file mark means if only one file
        mark has been skipped.



     _L_i_m_i_t_a_t_i_o_n_s

        With _f_t_a_p_e_-_3_._0_4_d (and later versions) it is nevertheless
        impossible to use MTFSFM to append data to a tape volume. Since
        version 3.03 all write access to the tape is iilllleeggaall uunnlleessss the
        tape is located at either BOT (_B_e_g_i_n _O_f _T_a_p_e) or EOD (_E_n_d _O_f
        _D_a_t_a, end of the area that already is occupied by data). _E_O_D is
        defined to be the location aafftteerr the last file mark.



     _E_x_a_m_p_l_e

        skip to end of the current tape volume




          mt -f /dev/nqft0 fsfm





     _R_e_f_e_r_e_n_c_e_s



        ````FFiillee mmaarrkkss''''..


        ````MMTTBBSSFFMM''''..

        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTFFSSFF''''..


        ````MMTTBBSSFF''''..


        ````MMTTWWEEOOFF''''..

  99..88..11..1133..  MMTTEEOOMM



     C code



          struct mtop op = { MTEOM, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Positions at the end of the portion of the tape already used for
        recording data. MTEOM positions after the last file mark, ready
        for appending another file.



     _L_i_m_i_t_a_t_i_o_n_s

        _f_t_a_p_e_-_3_._0_4_d (and later versions) cannot append volumes to a
        cartridge that has been created with _f_t_a_p_e_-_2_._x as the file mark
        emulation code of the two versions is just too different. See
        ``ftape-2x file marks'', See ``ftape-3x file marks''.



     _E_x_a_m_p_l_e

        skip to the end of the recorded media




          mt -f /dev/nqft0 eom




     or equivalently




          mt -f /dev/nqft0 seod





     _R_e_f_e_r_e_n_c_e_s



        ````FFiillee mmaarrkkss''''..


        ````MMTTBBSSFFMM''''..


        ````RReewwiinnddiinngg ddeevviicceess aanndd ttaappee mmoottiioonn ccoommmmaannddss''''..


        ````MMTTFFSSFF''''..


        ````MMTTBBSSFF''''..


        ````MMTTWWEEOOFF''''..

  99..88..11..1144..  MMTTEERRAASSEE



     C code



          struct mtop op = { MTERASE, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Erases the tape BBee ccaarreeffuull!!



     _N_o_t_e_s


     +o  Clears the file mark list only, i.e. doesn't really erase the
        data on the tape cartridge.

     +o  With _f_t_a_p_e_-_3_._0_4_d (and later versions) this means that the first
        data segment is written full with zeroes (see ``ftape-3x file
        marks''). Thus MTERASE erases at least the data in the first
        segment following the header segments.

     +o  _f_t_a_p_e_-_3_._0_4_d (and later versions) also changes the tape label to




          Ftape - The Linux Floppy Tape Project!




     +o  _f_t_a_p_e_-_2_._x resp. _s_f_t_a_p_e needed this command to initialise a
        cartridge before file marks could be used.

     +o  IInn ccoonnttrraasstt ttoo aallll pprreevviioouuss vveerrssiioonnss ooff _f_t_a_p_e tthhee _f_t_a_p_e_-_3_._0_4_d
        ((aanndd llaatteerr vveerrssiioonnss)) ddrriivveerr nnoo lloonnggeerr rreeqquuiirreess eerraassuurree ooff aa
        ccaarrttrriiddggee ttoo uussee ffiillee mmaarrkkss..



     _E_x_a_m_p_l_e



          mt -f /dev/nqft0 erase





     _R_e_f_e_r_e_n_c_e_s

        ``File marks''


  99..88..11..1155..  MMTTSSEETTBBLLKK



     C code



          struct mtop op = { MTSETBLK, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Set block length to COUNT bbyytteess.



     _N_o_t_e_s


     +o  The default block size of _f_t_a_p_e_-_3_._0_4_d (and later versions) is
        10kb which matches the default of the GNU tar program.

     +o  The argument COUNT has to be a multiple of 1024 (including 0).

     +o  A maximum block size of 62kb is allowed.

     +o  An argument of 0 means to switch to variable block size mode.
        This is implemented in _f_t_a_p_e_-_3_._0_4_d (and later versions) by
        setting the internal block size variable zft_blk_sz to 1 and
        thus has some unexpected side affects on the MTFSR, MTBSR and
        MTSEEK ioctls which interpret their arguments in units of
        zft_blk_sz bytes, i.e. they take their argument as a byte count
        when _f_t_a_p_e_-_3_._0_4_d (and later versions) is in variable block size
        mode.

     +o  When writing a volume, the block size used for the volume is
        stored in the corresponding volume table entry, (see
        ``MTIOCVOLINFO''), because the _f_t_a_p_e_-_3_._0_4_d driver needed to
        remember the block size of a tape volume when it was using
        compression.
     _C_a_v_e_a_t_s

        When reading a volume one has to use the block size the volume
        was created with. There is no need use the MTSETBLK ioctl again
        but the read count has to be a multiple of the original block
        size.



     _E_x_a_m_p_l_e

        set the block size to the maximum allowed




          mt -f /dev/nqft0 setblk 63488




     switch to variable block size mode.




          mt -f /dev/nqft0 setblk 0





     _R_e_f_e_r_e_n_c_e_s



        ````TTaappee bblloocckkss''''..


        ````MMTTFFSSRR''''..


        ````MMTTBBSSRR''''..


        ````MMTTSSEEEEKK''''..


        ````CCoommpprreessssiioonn''''..

  99..88..11..1166..  MMTTSSEETTDDEENNSSIITTYY



     C code



          struct mtop op = { MTSETDENSITY, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);






     _D_e_s_c_r_i_p_t_i_o_n

        Set tape density (normally for SCSI tapes).



     _N_o_t_e_s

        For _f_t_a_p_e_-_3_._0_4_d (and later versions) this ioctl is used to tune
        the amount of debugging output produced by the driver. _f_t_a_p_e_-_2_._x
        and _s_f_t_a_p_e used to utilise MTFSR (see ``MTFSR'') for doing this.
        Trace levels control the amount of debugging output as follows:



        1.  bugs

        2.  + errors

        3.  + warnings

        4.  + information

        5.  + more information

        6.  + program flow

        7.  + fdc/dma info

        8.  + data flow

        9.  + everything else


        This works only if the driver has been compiled _w_i_t_h_o_u_t the
        -DNO_TRACE_AT_ALL flag (see ``TRACE_FLAGS'').  SSeettttiinngg tthhee ttrraaccee
        lleevveell ttoo aa vvaalluuee >>== 55 hheeaavviillyy aaffffeeccttss _f_t_a_p_e''ss bbeehhaavviioouurr:: iitt iiss
        mmoorree oorr lleessss uunnuussaabbllee.. The reason for this is simply the fact
        that printing to the system console is rather time consuming and
        therefore has a bad impact on the timing of the driver.



     _E_x_a_m_p_l_e

        disable all debugging output




          mt -f /dev/nqft0 setdensity 0





     _E_x_a_m_p_l_e

        trace the program flow of the driver




          mt -f /dev/nqft0 setdensity 5


     _R_e_f_e_r_e_n_c_e_s



        ````TTeessttiinngg ffttaappee''''..


        ````TTRRAACCEE__FFLLAAGGSS''''..

  99..88..11..1177..  MMTTSSEEEEKK



     C code



          struct mtop op = { MTSEEK, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Seek to the specified block.



     _N_o_t_e_s


     +o  _f_t_a_p_e_-_4_._0_4 emulates blocks of a constant length. That is, MTSEEK
        don't skip floppy tape segments but blocks of a virtual size
        between 1 kb and 62 kb depending on what was specified with
        MTSETBLK (see ``MTSETBLK'').

     +o  One needs to use the non-rewinding devices when using this with
        the mt program. See ``Rewinding devices and tape motion
        commands''.

     +o  MTSEEK just modifies a variable and does not result in tape
        motion.



     _C_o_m_p_a_t_i_b_i_l_i_t_y


     +o  When using _f_t_a_p_e_-_3_._0_4_d and later versions up to _f_t_a_p_e_-_4_._0_2
        (inclusively) seeking always stays within the same volume, and
        the block address is relative to the start of the current
        volume. This was incompatible with the way SCSI drives implement
        this command where the block address is relative to the
        beginning of the tape and has been fixed in _f_t_a_p_e_-_4_._0_3.

     +o  In variable block size mode the argument is interpreted as the
        desired position measured in _b_y_t_e_s. Maybe this is a bug.

     +o  _f_t_a_p_e_-_2_._x resp. _s_f_t_a_p_e didn't implement this command.



     _E_x_a_m_p_l_e

        seek to the 10th block, measured from the start of the current
        volume




          mt -f /dev/nqft0 seek 10





     _R_e_f_e_r_e_n_c_e_s



        ````TTaappee bblloocckkss''''..


        ````MMTTFFSSRR''''..


        ````MMTTBBSSRR''''..


        ````MMTTSSEETTBBLLKK''''..

  99..88..11..1188..  MMTTTTEELLLL

  Tell block. Return the number of block relative to current file.
  However, as long as the Linux kernel defines the MTIOCTOP ioctl as
  _w_r_i_t_e _o_n_l_y, this results in an ioctl error. See ``Query the tape
  position''.


  99..88..11..1199..  MMTTSSEETTDDRRVVBBUUFFFFEERR



     C code



          struct mtop op = { MTSETDRVBUFFER, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Set the tape drive buffer code to number (SCSI tapes).



     _A_b_u_s_e

        _f_t_a_p_e_-_3_._0_4_d (and later versions) abuses this command to set the
        number of dma buffers it consumes for its cyclic read/write
        buffer list.



     _N_o_t_e_s

        _f_t_a_p_e needs at least 3 dma buffers to work reasonably well.


        The maximum allowed number of dma buffers is determined by the
        FDC driver modules:




        ftape-internal.o

           The maximum value is 16 but you might get less due to
           fragmentation of the physical memory. ftape-internal needs a
           continuous block of at least 32k aligned at 32k boundary. The
           return value is -ENOMEM if the driver wasn't able to allocate
           the desired size. In this case it allocates as much as it
           can. Keep in mind that kernel memory cannot be swapped out.


           The default is 3.



        bpck-fdc.o


        trakker.o

           The maximum and minimum value is 4. The drivers are kept in
           the memory of the external floppy tape drive, so you don't
           need to worry too much about memory consumption in this case.



     Example

        set the number of dma buffers to 10. As each dma buffer has a
        size of 32kb this results in 320kb of memory being allocated for
        _f_t_a_p_e.




          mt -f /dev/nqft0 setdrvbuffer 10





     References

        ``Swapout''


  99..88..11..2200..  MMTTLLOOCCKK



     C code



          struct mtop op = { MTLOCK, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);


     _D_e_s_c_r_i_p_t_i_o_n

        Locks the tape drive door.



     _L_i_m_i_t_a_t_i_o_n_s

        Only supported by Iomega Ditto Max tape drive. It will be
        treated as a no-op with other tape drives.



     _N_o_t_e_s

        ft locks the tape drive door automatically when you open the
        device, and unlocks it when the device is closed. If you call
        this command, then _f_t_a_p_e keeps the door locked even when the
        device has been closed. In this case you have to use the
        MTUNLOCK (see ``MTUNLOCK'') command or the MTRESET (see
        ``MTRESET'') explicitly or you never will be able to open the
        door again until power is cycled.



     _E_x_a_m_p_l_e

        Lock the tape drive door




          mt -f /dev/nqft0 lock





     _R_e_f_e_r_e_n_c_e_s



        ````MMTTUUNNLLOOCCKK''''..


        ````MMTTRREESSEETT''''..


        ````MMTTSSEETTPPAARRTT''''..

  99..88..11..2211..  MMTTUUNNLLOOCCKK



     C code



          struct mtop op = { MTUNLOCK, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);






     _D_e_s_c_r_i_p_t_i_o_n

        Unlocks the tape drive door.



     _L_i_m_i_t_a_t_i_o_n_s

        Only supported by Iomega Ditto Max tape drive. It will be
        treated as a no-op with other tape drives.



     _N_o_t_e_s

        ft locks the tape drive door automatically when you open the
        device, and unlocks it when the device is closed. If you call
        this command, then _f_t_a_p_e will unlock the door instantly. You may
        also need the MTUNLOCK command to clear the door lock previously
        set by a MTLOCK (see ``MTLOCK'') command.



     _E_x_a_m_p_l_e

        Clear the door lock




          mt -f /dev/nqft0 unlock





     _R_e_f_e_r_e_n_c_e_s



        ````MMTTLLOOCCKK''''..


        ````MMTTRREESSEETT''''..


        ````MMTTSSEETTPPAARRTT''''..

  99..88..11..2222..  MMTTLLOOAADD



     C code



          struct mtop op = { MTLOAD, 0 };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Loads the tape cartridge if this is supported by the hardware.
     _L_i_m_i_t_a_t_i_o_n_s

        Only supported by Iomega Ditto Max tape drive.



     _N_o_t_e_s

        This command reverses the MTOFFL command. In contrast to the
        MTRESET command which also undoes a previous MTOFFL command the
        tape drive hardware isn't reset, which causes MTLOAD to be
        faster than the MTRESET command, in case there is already a
        cartridge inserted and the tape drive has been put offline by a
        previously issued MTOFFL command.


        However, for the Ditto Max drive this isn't true, as the MTOFFL
        command _r_e_a_l_l_y ejects the cartridge, and the tape drive will
        execute a seek load point sequence once the cartridge has been
        loaded by this command.


        In either case, when this command is issued while a cartridge is
        present and the drive hasn't been put offline then this command
        is a no-op, i.e. it does nothing.


        This is different to the behaviour of the MTRESET command which
        resets the driver soft- and hardware regardless off the presence
        or absence of a cartridge and the internal offline state of the
        _f_t_a_p_e driver.



     _E_x_a_m_p_l_e

        Put the drive offline, then re-load the cartridge.




          mt -f /dev/nqft0 offline
          mt -f /dev/nqft0 load




     Skip to past the first file mark




          mt -f /dev/nqft0 fsf




     and load again.




          mt -f /dev/nqft0 load



     This was a no-op but resetting would have been quite an effect. But




          mt -f /dev/nqft0 offline
          mt -f /dev/nqft0 reset




     is equivalent to the first offline/load commands.



     _R_e_f_e_r_e_n_c_e_s



        ````MMTTOOFFFFLL''''..


        ````MMTTRREESSEETT''''..


        ````MMTTUUNNLLOOAADD''''..

  99..88..11..2233..  MMTTUUNNLLOOAADD

  This is implemented as an alias to the MTOFFL command..It does exactly
  the same, rewind the cartridge and unload it in the case of the Ditto
  Max drive. If unloading isn't supported by the hardware then an
  internal flag causes all subsequent tape operations with the exception
  of MTLOAD, MTRESET and MTIOCCGET to fail.  See ``MTOFFL''.


  99..88..11..2244..  MMTTCCOOMMPPRREESSSSIIOONN



     C code



          struct mtop op = { MTCOMPRESSION, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        With _f_t_a_p_e_-_3_._0_4_d it can be used to enable compression when using
        the /dev/qft* and /dev/nqft* devices which normally wouldn't use
        compression.



     _P_i_t_f_a_l_l_s

        TThhiiss ccoommmmaanndd iiss nnoo lloonnggeerr ssuuppppoorrtteedd wwiitthh _f_t_a_p_e_-_4_._0_4.




     _E_x_a_m_p_l_e

        enable compression for /dev/qft0




          mt -f /dev/nqft0 compress 1





     _E_x_a_m_p_l_e

        disable compression for /dev/qft0




          mt -f /dev/nqft0 compress 0





     _R_e_f_e_r_e_n_c_e_s



        ````//ddeevv//qqfftt''''..


        ````zzffttaappee ddeevviicceess ttaabbllee''''..


        ````CCoommpprreessssiioonn''''..

  99..88..11..2255..  MMTTSSEETTPPAARRTT



     C code



          struct mtop op = { MTSETPART, COUNT };
          result = ioctl(tapefd, MTIOCTOP, &op);





     _D_e_s_c_r_i_p_t_i_o_n

        Move the tape head at the partition with the number COUNT.



     _N_o_t_e_s


     +o  Only the Iomega Ditto Max floppy tape drives has more than one
        partition. Actually, it has two partitions. A very small one,
        about 130mb, and a large one that occupies all the remaining
        space.
     +o  Initially the Iomega Ditto Max positions at partition 1 which is
        the large partition. The small one has the number 0.



     _L_i_m_i_t_a_t_i_o_n_s

        Only the Iomega Ditto Max has more than one partition, all other
        floppy tape drives have a single partition.



     _E_x_a_m_p_l_e

        Position at the large partition. Remember that omitting the
        COUNT value when using mt is equivalent to setting it to 1.




          mt -f /dev/nqft0 setpart





     _E_x_a_m_p_l_e

        Move to small partition




          mt -f /dev/nqft0 setpart 0





     _R_e_f_e_r_e_n_c_e_s



        ````MMTTLLOOCCKK''''..


        ````MMTTUUNNLLOOCCKK''''..


        ````MMTTSSEETTPPAARRTT''''..

  99..88..22..  MMTTIIOOCCGGEETT ,, qquueerryy tthhee ttaappee ddrriivvee ssttaattuuss

  Please read also the man page of the mt program (mt 1 ftmt) (-- You
  can download it as part of the ftape-tools package from the
  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  or from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  . The following is from the standard Linux include file
  [/usr/src/linux/]include/linux/mtio.h <mtio.h>:






  /* structure for MTIOCGET - mag tape get status command */
  struct  mtget {
          long    mt_type;        /* type of magtape device */
          long    mt_resid;       /* residual count: (not sure)
                                   *      number of bytes ignored, or
                                   *      number of files not skipped, or
                                   *      number of records not skipped.
                                   */
          /* the following registers are device dependent */
          long    mt_dsreg;       /* status register */
          long    mt_gstat;       /* generic (device independent) status */
          long    mt_erreg;       /* error register */
          /* The next two fields are not always used */
          __kernel_daddr_t mt_fileno;     /* number of current file on tape */
          __kernel_daddr_t mt_blkno;      /* current block number */
  };




  The fields mt_dsreg and mt_erreg were unused by _f_t_a_p_e_-_2_._x and _s_f_t_a_p_e
  whereas _f_t_a_p_e_-_3_._0_4_d (and later versions) uses them to store the last
  queried _h_a_r_d_w_a_r_e tape drive status and error code. _f_t_a_p_e defines for
  this purpose the following two unions in
  [/usr/src/ftape-4.04/]include/linux/ftape.h <ftape.h>.  The meaning
  should be quite clear. The components contain the bits returned by the
  respective QIC report commands (refer to the _Q_I_C_-_1_1_7 standard, QIC
  organisations home page <http://www.qic.org>).




       /* the following two may be reported when MTIOCGET is requested ... */
       typedef union {
               struct {
                       __u8 error;
                       __u8 command;
               } error;
               long space;
       } ft_drive_error;
       typedef union {
               struct {
                       __u8 drive_status;
                       __u8 drive_config;
                       __u8 tape_status;
               } status;
               long space;
       } ft_drive_status;




  99..88..33..  MMTTIIOOCCPPOOSS ,, qquueerryy tthhee ttaappee ppoossiittiioonn

  Note that _f_t_a_p_e_-_2_._x and _s_f_t_a_p_e didn't implement this ioctl.
  _f_t_a_p_e_-_3_._0_4_d and later versions up to _f_t_a_p_e_-_4_._0_2 return the block
  number relative to the current tape volume, i.e. the distance to the
  next file mark towards BOT.


  This was incompatible with the way SCSI drives implement this command
  where the block address is relative to the beginning of the tape and
  has been fixed in _f_t_a_p_e_-_4_._0_3.



  This command is sent to the drive by the mt command with




       mt -f /dev/nqft0 tell




  The following is from the standard Linux include file


  [/usr/src/linux/]/include/linux/mtio.h <mtio.h>.




       /* structure for MTIOCPOS - mag tape get position command */
       struct  mtpos {
               long    mt_blkno;       /* current block number */
       };
       #define MTIOCPOS        _IOR('m', 3, struct mtpos)      /* get tape position */




  99..88..44..  MMTTIIOOCCRRDDFFTTSSEEGG,, rreeaaddiinngg aarrbbiittrraarryy ffllooppppyy ttaappee sseeggmmeennttss

  MTIOCRDFTSEG and MTIOCWRFTSEG are provided by the driver to allow
  implementation of a really _Q_I_C_-_1_1_3 conforming backup program in user
  space without having to write a new kernel level device driver (refer
  to the QIC-113 standard, QIC organisations home page
  <http://www.qic.org>). Such a program should use the /dev/rawft* and
  /dev/nrawft* devices oonnllyy, because _f_t_a_p_e_-_3_._0_4_d (and later versions)
  omits manipulation of the volume table when used with this devices
  such that the user level program gains complete control over the
  logical data structure of the floppy tape cartridge (see ``Raw tape
  access devices'').


  Such a QIC-113 Backup Program still should use the normal read() and
  write() system calls to read and write most of the data to the tape
  and use the ioctls only to manipulate the header segments and the
  volume table segment.


  Note that the return value of the ioctl command is nnoott the result of
  the ft_read_segment() or ft_write_segment() functions, but indicates
  only ioctl command failure or success. If the calling program likes to
  read or write damaged segments, let it do that. The result of the
  read/write operation is stored in the mt_result field of struct
  mtftseg.


  The following simple structure is used to read or write a single
  segment. One may also read and write the header segments, but that
  means that one has to act really carefully, because neither
  _f_t_a_p_e_-_3_._0_4_d (and later versions) nor any other tape program will be
  able to read or write to a tape any longer if garbage is written to
  the header segments.


  The mt_mode component controls how the data is read and written.
  MT_FT_RD_AHEAD causes the driver to read as much data from the tape as
  fits into the dma buffers such that subsequent calls with incremented
  segment number will result in continuous tape motion.  MT_FT_WR_ASYNC
  will only result in data transfer when all dma buffers are full. The
  data is also flushed to tape when the state of the driver changes or
  when the device is closed. MT_FT_WR_SINGLE and MT_FT_RD_SINGLE will
  stop the tape after the desired segment has been read or written.
  MT_FT_WR_MULTI causes the tape to write the segment. The tape drive
  will continue streaming if more data is provided but subsequent
  ioctls.


  The volume table manipulation tools vtblc (-- You can download it as
  part of the ftape-tools package from the
  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  or from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  (See Vtblc (info file ftape-tools)) makes use of this ioctl to read
  the volume table and write it back to tape after modifying it.




       #define MT_FT_RD_SINGLE  0
       #define MT_FT_RD_AHEAD   1
       #define MT_FT_WR_ASYNC   0 /* start tape only when all buffers are full     */
       #define MT_FT_WR_MULTI   1 /* start tape, continue until buffers are empty  */
       #define MT_FT_WR_SINGLE  2 /* write a single segment and stop afterwards    */
       #define MT_FT_WR_DELETE  3 /* write deleted data marks, one segment at time */
       struct mtftseg
       {
               unsigned mt_segno;   /* the segment to read or write */
               unsigned mt_mode;    /* modes for read/write (sync/async etc.) */
               int      mt_result;  /* result of r/w request, not of the ioctl */
               void    *mt_data;    /* User space buffer: must be 29kb */
       };
       #define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg)  /* read a segment */
       #define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg)  /* write a segment */




  99..88..55..  MMTTIIOOCCVVOOLLIINNFFOO

  The following comes from _f_t_a_p_e's replacement


  [/usr/src/ftape-4.04/]include/linux/mtio.h <mtio.h>


  for the kernel's mtio.h header file (see ``MTSETBLK'').  Note that
  mt_blksz is measured in _b_y_t_e_s but mt_size and mt_rawsize are measured
  in _k_i_l_o_b_y_t_e_s.




       struct mtvolinfo {
               unsigned int mt_volno;   /* vol-number */
               unsigned int mt_blksz;   /* blocksize used when recording */
               unsigned int mt_rawsize; /* raw tape space consumed, in kb */
               unsigned int mt_size;    /* volume size after decompression, in kb */
               unsigned int mt_cmpr:1;  /* this volume has been compressed */
       };
       #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)



  This ioctl queries information about the volume the tape drive is
  positioned at. The meaning of the components of the structure are:




     mt_volno

        The number of the current volume.


     mt_blksz
        The block-size the volume was recorded with measured in _b_y_t_e_s
        (see ``MTSETBLK'', see ``Tape blocks'').


     mt_rawsize
        The amount of space the volume occupies on the tape measured in
        kkiilloobbyytteess


     mt_size
        The real size of the volume aafftteerr decompression measured in
        kkiilloobbyytteess


     mt_cmpr
        This indicates whether compression was used to record the
        volume, See ``zftape devices''. Note that _f_t_a_p_e_-_4_._0_4 no longer
        supports writing of compressed archives while support for
        reading compressed archives is kept for compatibility reasons.


  When this ioctl is send to the driver when it is located at EOM (end
  of recorded media, end of data), then mt_rawsize gives the amount of
  data still usable on the tape. In this case the mt_size component will
  be set to zero and mt_blksz reflects block size currently used by
  _f_t_a_p_e_-_3_._0_4_d (and later versions).


  99..88..66..  MMTTIIOOCCGGEETTSSIIZZEE

  This should be self-explanatory:




       /* get tape capacity (ftape/zftape). This is measured in KB
        */
       struct mttapesize {
               unsigned int mt_capacity; /* entire, uncompressed capacity */
               unsigned int mt_used;     /* what has been used so far, raw
                                          * uncompressed amount
                                          */
       };
       #define MTIOCGETSIZE _IOR('m',  9, struct mttapesize) /* get cartridge size */






     mt_capacity

        entire capacity of the tape cartridge, measured in kkiilloobbyytteess.

     mt_used
        what has been used so far, measured in kkiilloobbyytteess.


  99..88..77..  FFoorrmmaattttiinngg ooff ccaarrttrriiddggeess uussiinngg MMTTIIOOCCFFTTFFOORRMMAATT

  Most of the formatting stuff has been moved from the kernel level
  device driver to a user level program ftformat (-- You can download it
  as part of the ftape-tools package from the
  Ftape home page <http://www.instmath.rwth-aachen.de/~heine/ftape>
  or from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/--)

  . Please refer to the documentation of that program for further
  information how to actually format floppy tape cartridges. See
  Ftformat (info file ftape-tools).


  The following gives only an outline of the ioctl interface to the
  kernel level device driver. The argument to the MTIOCFTFORMAT ioctl
  has to be of type struct mtftformat. The definitions of that structure
  and of the ioctl are included in a subsection for your reference.


  Note that the MTIOCFTFORMAT ioctl has to be accompanied by several
  MTIOCFTCMD ioctl calls. See ``MTIOCFTCMD''. It has to be understood
  that the MTIOCFTFORMAT does _n_o_t switch the tape drive to format mode,
  neither does it erase the old format by means of the physical forward
  or physical reverse QIC-117 floppy tape commands.


  There is subsection for each of the operations that can be performed
  with the MTIOCFTFORMAT ioctl (i.e. FTFMT_SET_PARMS, FTFMT_GET_PARMS,
  FTFMT_FORMAT_TRACK, FTFMT_STATUS, FTFMT_VERIFY) and an additional
  subsection that is a quotation from
  [/usr/src/ftape-4.04/]include/linux/mtio.h <mtio.h> and contains the
  ioctl definitions.


  99..88..77..11..  DDiiffffeerreenncceess bbeettwweeeenn ffttaappee--44..0044  aanndd oollddeerr ddrriivveerrss

  With _f_t_a_p_e_-_3_._0_4_d the user level formatting program (i.e. ftformat) had
  to use mmap (see man 2 mmap) to map the driver's DMA buffers into its
  address space, compute the sector coordinates to be used for
  formatting the cartridge and fill the memory mapped buffers with this
  coordinates. This has been changed as the parallel port floppy tape
  drives have on-board memory which contains the DMA buffers.


  Memory mapping those buffers is possible, in principle, but quite
  complicated. It was much easier to move the computation of the sector
  coordinates back to kernel space and abandon all that mmap fancy.


  To distinguish between the two different protocols a magic number has
  been introduced which distinguishes the two protocols. It is chosen in
  a way that the presence of the magic number makes the _f_t_a_p_e_-_3_._0_4_d
  driver bail out and the absence of the magic number or a wrong magic
  number makes the _f_t_a_p_e_-_4_._0_4 driver bail out. See ``struct
  mtftformat''.


  The ftformat program of the ftape-tools distributions understands both
  protocols. For an outline of the old protocol refer to the
  documentation of the _f_t_a_p_e_-_3_._0_4_d driver. See Start formatting a tape
  track (info file ftape).

  There are only slight differences between _f_t_a_p_e_-_4_._0_2 and _f_t_a_p_e_-_4_._0_4.
  It is now possibly to pass a _f_o_r_m_a_t _f_i_l_l_e_r _b_y_t_e to the kernel which is
  used by the FDC to fill the gaps between the floppy tape sectors and
  segments. Also, the gap3 parameter is now passed to the kernel with
  the FTFMT_SET_PARMS operation rather than with the FTFMT_TRACK call.


  99..88..77..22..  TThhee MMTTIIOOCCFFTTFFOORRMMAATT  iiooccttll ddeeffiinniittiioonn



       /*  possible values of the ftfmt_op field
        */
       #define FTFMT_SET_PARMS         1 /* set software parms */
       #define FTFMT_GET_PARMS         2 /* get software parms */
       #define FTFMT_FORMAT_TRACK      3 /* start formatting a tape track   */
       #define FTFMT_STATUS            4 /* monitor formatting a tape track */
       #define FTFMT_VERIFY            5 /* verify the given segment        */
       #define FTFMT_API_VERSION       6 /* return FTFMT_MAGIC */
       #define FTFMT_MAGIC             (5 << 16) /* version of format API */






       struct ftfmtparms {
               unsigned char  ft_qicstd;   /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
               unsigned char  ft_fmtcode;  /* Refer to the QIC specs */
               unsigned char  ft_fhm;      /* floppy head max */
               unsigned char  ft_ftm;      /* floppy track max */
               unsigned short ft_spt;      /* segments per track */
               unsigned short ft_tpc;      /* tracks per cartridge */
               unsigned char  ft_gap3;     /* size of gap3, for FORMAT_TRK */
               unsigned char  ft_ffb;      /* format filler byte */
       };






       struct ftfmttrack {
               unsigned int  ft_track;   /* track to format */
       };






       struct ftfmtstatus {
               unsigned int  ft_segment;  /* segment currently being formatted */
       };






       struct ftfmtverify {
               unsigned int  ft_segment;   /* segment to verify */
               unsigned long ft_bsm;       /* bsm as result of VERIFY cmd */
       };


       struct mtftformat {
               unsigned int fmt_magic;   /* should be FTFMT_MAGIC */
               unsigned int fmt_op;      /* operation to perform */
               union fmt_arg {
                       struct ftfmtparms  fmt_parms;  /* format parameters */
                       struct ftfmttrack  fmt_track;  /* ctrl while formatting */
                       struct ftfmtstatus fmt_status;
                       struct ftfmtverify fmt_verify; /* for verifying */
               } fmt_arg;
       };
       #define MTIOCFTFORMAT   _IOWR('m', 10, struct mtftformat) /* format ftape */




  99..88..77..33..  FFTTFFMMTT__SSEETT__PPAARRMMSS  ---- sseett ssooffttwwaarree ppaarraammeetteerrss

  This ioctl informs the kernel driver module about the parameters that
  will be used when formatting the tape cartridge. Note that the kernel
  driver does not alter the hardware state of the tape drive, i.e. it
  doesn't set the number of format segment nor does it program the tape
  drive to the desired QIC standard. This must be done using the
  MTIOCFTCMD ioctl (see ``MTIOCFTCMD''). FTFMT_SET_PARMS merely results
  in recalibration of the data rate and in the recalculation of timeouts
  and synchronises the user level formatting program with the hardware
  driver. See ``struct mtftformat'' for the complete definition of the
  data structures. The following parameters must be set:




       struct ftfmtparms {
               unsigned char  ft_qicstd;   /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
               unsigned char  ft_fmtcode;  /* Refer to the QIC specs */
               unsigned char  ft_fhm;      /* floppy head max */
               unsigned char  ft_ftm;      /* floppy track max */
               unsigned short ft_spt;      /* segments per track */
               unsigned short ft_tpc;      /* tracks per cartridge */
               unsigned char  ft_gap3;     /* size of gap3, for FORMAT_TRK */
               unsigned char  ft_ffb;      /* format filler byte */
       };




  Please refer also to the QIC standards QIC-40, QIC-80, QIC-3010,
  QIC-3020 and QIC-117 for the correct settings. The standards can be
  found at the QIC organisations home page <http://www.qic.org>.




     ft_qicstd

        This must be set to the desired QIC standard. It should be one
        out of




        QIC_TAPE_QIC40


        QIC_TAPE_QIC80


        QIC_TAPE_QIC3020


        QIC_TAPE_QIC3010

        These symbols are defined in


        [/usr/src/ftape-4.04/]include/linux/qic117.h <qic117.h>


        as follows




          #define QIC_TAPE_QIC40          0x01
          #define QIC_TAPE_QIC80          0x02
          #define QIC_TAPE_QIC3020        0x03
          #define QIC_TAPE_QIC3010        0x04





     ft_fmtcode

        This must be set to the format code that shall be written to the
        header segments. The possible values are defined in


        [/usr/src/ftape-4.04/]include/linux/ftape-header-segment.h
        <ftape-header-segment.h>




          typedef enum {
                  fmt_normal = 2, /*  QIC-80 post Rev. B 205Ft or 307Ft tape    */
                  fmt_1100ft = 3, /*  QIC-80 post Rev. B 1100Ft tape            */
                  fmt_var    = 4, /*  QIC-80 post Rev. B variable length format */
                  fmt_425ft  = 5, /*  QIC-80 post Rev. B 425Ft tape             */
                  fmt_big    = 6  /*  QIC-3010/3020 variable length tape with more
                                   *  than 2^16 segments per tape
                                   */
          } ft_format_type;





     ft_fhm, ft_ftm

        These are abbreviations for Floppy Head Max and Floppy Track
        Max. To understand was this means one has to recall that a _F_D_C,
        Floppy Disk Controller, is used to drive the tape. In order to
        make this possible each _t_a_p_e _s_e_c_t_o_r must be given a _f_l_o_p_p_y _d_i_s_k
        _s_e_c_t_o_r _a_d_d_r_e_s_s. This means, in effect, that the floppy tape
        drive simulates a (very large) floppy disk drive. ft_fhm gives
        the number of read/write heads of that virtual floppy disk
        drive, and the ft_ftm specifies the number of tracks of the
        virtual floppy disk in the virtual floppy disk drive.




     ft_spt, ft_tpc

        These parameters give the tape cartridge geometry. ft_spt means
        Segments Per Track and ft_tpc is an abbreviation for Tracks Per
        Cartridge. Both values are to be understood as the linear tape
        cartridge geometry in contrast to the virtual floppy disk
        parameters that are specified by ft_fhm and ft_ftm.



     ft_gap3

        A number giving the length of _g_a_p_3 during the formatting
        process. This is rather technical. Read (e.g.) the
        specifications of the _I_n_t_e_l _8_2_0_7_8 _6_4 _P_i_n FDC which contains the
        layout of floppy disk sectors (including data, CRC and address
        fields). The actual values for _g_a_p_3 are mentioned in the QIC
        standards QIC-40, QIC-80, QIC-3010 and  QIC-3020.



     ft_ffb

        The value _g_a_p_3 is filled with. The recommended values are
        mentioned in the QIC-117 standard.


  99..88..77..44..  FFTTFFMMTT__GGEETT__PPAARRMMSS  ---- ggeett ssooffttwwaarree ppaarraammeetteerrss

  This queries the driver about the parameters it uses to access a
  floppy tape cartridge. Please refer to the previous section for
  further explanations. See ``FTFMT_SET_PARMS''


  99..88..77..55..  FFTTFFMMTT__FFOORRMMAATT__TTRRAACCKK  ---- ssttaarrtt ffoorrmmaattttiinngg aa ttaappee ttrraacckk

  This command initiates the formatting of a tape track. It sets up the
  cyclic dma buffer queue, fills the DMA buffers with the proper sector
  coordinates to format the tape cartridge, conforming to the parameters
  previously set with FTFMT_SET_PARMS (see ``FTFMT_SET_PARMS''),
  programs the FDC and DMA controllers and sends the logical forward
  command to the tape drive.




       struct ftfmttrack {
               unsigned int  ft_track;   /* track to format */
       };




  The mode of the tape drive remains _u_nchanged (i.e. format mode is _n_o_t
  entered) but the sector coordinates are computed by this command. The
  format mode must have been entered previously by the user level
  formatting program using the MTIOCFTCMD ioctl (see ``MTIOCFTCMD'').


  With _f_t_a_p_e_-_3_._0_4_d the sector coordinates had to be computed in user
  space. This isn't true any longer. For an outline of the old protocol
  refer to the documentation of the _f_t_a_p_e_-_3_._0_4_d driver. See Start
  formatting a tape track (info file ftape).



  99..88..77..66..  FFTTFFMMTT__SSTTAATTUUSS  ---- mmoonniittoorr ffoorrmmaattttiinngg aa ttaappee ttrraacckk

  This operation is needed to synchronise the user level formatting
  program with the kernel level device driver while formatting a tape
  track. It simply returns the number of the segment that just has been
  formatted.


  However, the main purpose of this command is to make the kernel driver
  update the DMA buffers with new sector coordinates and performs the
  DMA buffer flipping. Note that depending on the number of segments per
  tape track it might be the case that the coordinates for an entire
  tape track doesn't fit into the DMA buffers all at once. In this case,
  the FTFMT_STATUS operation uses the regions of the DMA buffers which
  already have been written to the FDC to store the coordinates for the
  remaining segments that didn't fit into the DMA buffers when they were
  filled the first time as a side effect of the FTFMT_FORMAT_TRACK
  operation.


  The FTFMT_STATUS operation is also nice for monitoring the progress
  the driver makes in formatting a tape track.


  99..88..77..77..  FFTTFFMMTT__VVEERRIIFFYY  ---- vveerriiffyy aa ttaappee sseeggmmeenntt



       struct ftfmtverify {
               unsigned int  ft_segment;   /* segment to verify */
               unsigned long ft_bsm;       /* bsm as result of VERIFY cmd */
       };




  ft_segment gives the segment number to verify, ft_bsm returns the bad
  sector map for this segment. Note that the kernel level device driver
  does _n_o_t enter verify mode itself. This must be done by the user level
  program using the MTIOCFTCMD ioctl. See ``MTIOCFTCMD''.


  99..88..88..  SSeennddiinngg rraaww QQIICC--111177  ccoommmmaannddss ttoo tthhee ttaappee ddrriivvee

  The purpose of this ioctl is to allow the major part of the formatting
  procedure to take place in user space rather than in the kernel level
  device driver. Please refer for to the comments in the code fragment
  below for the meaning of the components of the structure. Command
  definitions as used by ftape can be found in
  [/usr/src/ftape-4.04/]include/linux/qic117.h <qic117.h>.


  The ftformat program (see ``ftformat'') uses this ioctl.













  struct mtftcmd {
          unsigned int ft_wait_before; /* timeout to wait for drive to get ready
                                        * before command is sent. Milliseconds
                                        */
          qic117_cmd_t ft_cmd;         /* command to send */
          unsigned char ft_parm_cnt;   /* zero: no parm is sent. */
          unsigned char ft_parms[3];   /* parameter(s) to send to
                                        * the drive. The parms are nibbles
                                        * driver sends cmd + 2 step pulses */
          unsigned int ft_result_bits; /* if non zero, number of bits
                                        * returned by the tape drive
                                        */
          unsigned int ft_result;      /* the result returned by the tape drive*/
          unsigned int ft_wait_after;  /* timeout to wait for drive to get ready
                                        * after command is sent. 0: don't wait
                                        */
          int ft_status;               /* status returned by ready wait
                                        * undefined if timeout was 0.
                                        */
          int ft_error;                /* error code if error status was set by
                                        * command
                                        */
  };
  #define MTIOCFTCMD      _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */




  99..88..99..  SSwwiittcchhiinngg bbeettwweeeenn rraaww aanndd rreegguullaarr mmooddee

  The ioctls ``MTIOCRDFTSEG and MTIOCWRFTSEG'', ``MTIOCFTFORMAT'' and
  ``MTIOCFTMODE'' require that the _z_f_t_a_p_e driver has been switched to
  _r_a_w mode previously by issuing this ioctl with the ft_rawmode
  component set to 1. Note that the driver remembers its state between
  close and open calls. This means that an application program using
  this ioctl should switch back the driver to _r_e_g_u_l_a_r state by issuing
  this ioctl with the ft_rawmode component of its argument set to 0. The
  argument has to be of type struct mtftmode. This ioctl has been newly
  introduced in _f_t_a_p_e_-_4_._0_3 and obsoletes the use of the raw access
  devices /dev/rawft*. See ``Raw access mode''. The definition of the
  ioctl and its argument can be found in
  [/usr/src/ftape-4.04/]include/linux/mtio.h <mtio.h> Below is copy for
  your reference.




       struct mtftmode {
               int ft_rawmode:1; /* 1: switch to raw mode, 0: switch to normal mode */
       };
       #define MTIOCFTMODE     _IOW('m', 12, struct mtftmode) /* raw mode switch */




  When using the driver in raw mode it is nnoott possible to use file
  marks. Data is read from and written to tape as is.  Note that the
  volume table segment that is used to emulate file marks when using the
  driver with the other devices is treated as an ordinary data segment.
  Thus reading the first 29 kilobytes from the tape will give you the
  data of the volume table segment.


  The driver does nnoott detect tapes used by the original _f_t_a_p_e_-_2_._x.


  Raw mode could for example be used for writing backup software that is
  really _Q_I_C_-_1_1_3 compatible. _f_t_a_p_e_-_3_._0_4_d (and later versions) uses the
  volume-table in a way which provides only mmiinniimmaall _Q_I_C_-_1_1_3
  compatibility, QIC organisations home page <http://www.qic.org>. There
  are two additional ioctls which provide read (see ``MTIOCRDFTSEG and
  MTIOCWRFTSEG'') and write access to arbitrary floppy tape segments,
  including the header segments.


  The file [/usr/src/ftape-4.04/]include/linux/ftape-header-segment.h
  <ftape-header-segment.h>


  of the _f_t_a_p_e_-_4_._0_4 distribution provides some definitions which might
  be useful for writing a QIC-113 compatible backup program.


  1100..  CCoonncceepptt IInnddeexx

  1100..11..  //


     ````//ddeevv//nnqqfftt''''

     ````//ddeevv//nnrraawwfftt''''

     ````//ddeevv//nnrrfftt''''

     ````//ddeevv//nnzzqqfftt''''

     ````//ddeevv//qqfftt''''

     ````//ddeevv//rraawwfftt''''

     ````//ddeevv//rrfftt''''

     ````//ddeevv//zzqqfftt''''

  1100..22..  11


     ````11..22..1133''''

     ````11..22..1133,, cchhaannggiinngg tthhee kkeerrnneell bbyy hhaanndd''''

     ````11..22..1133,, ppaattcchhiinngg tthhee kkeerrnneell''''

  1100..33..  22


     ````22..xx..xx,, iinnssttaallllaattiioonn ooff ffttaappee''''

  1100..44..  AA


     ````AAllpphhaa''''

     ````AArrcchhiitteeccttuurreess''''

     ````AAuuttoo--llooaaddiinngg''''

  1100..55..  BB


     ````BBaacckkuupp ssooffttwwaarree''''

     ````BBlloocckk ssiizzee aanndd ccoommpprreessssiioonn''''

     ````BBlloocckk ssiizzee ooff aa vvoolluummee''''

     ````BBlloocckk ssiizzee,, ggeenneerraall ddiissccuussssiioonn''''

     ````BBlloocckk ssiizzee,, sseettttiinngg iitt''''

     ````BBoooott ppaarraammeetteerrss''''

     ````bbppcckk--ffddcc..oo,, fftt__ffddcc__bbaassee''''

     ````bbppcckk--ffddcc..oo,, fftt__ffddcc__iirrqq''''

     ````bbppcckk--ffddcc..oo,, fftt__ffddcc__ppaarrppoorrtt''''

     ````bbppcckk--ffddcc..oo,, fftt__ffddcc__rraattee__lliimmiitt''''

     ````bbppcckk--ffddcc..oo,, fftt__ffddcc__tthhrreesshhoolldd''''

     ````BBppcckk--ffddcc..oo,, iinnssttaallllaattiioonn''''

     ````BBppcckk--ffddcc..oo,, mmoodduullee ooppttiioonnss''''

     ````BBppcckk--ffddcc..oo,, uunniinnssttaallllaattiioonn''''

     ````BBRROOKKEENN__FFLLOOPPPPYY__DDRRIIVVEERR''''

     ````BBSSFF''''

     ````BBSSFFMM''''

     ````BBSSRR''''

     ````BBuugg rreeppoorrttiinngg''''

     ````BBuuggss,, aallrreeaaddyy kknnoowwnn''''

  1100..66..  CC


     ````CCaappaacciittyy''''

     ````CCaarrttrriiddggee ccaappaacciittyy''''

     ````CCoolloorraaddoo CCMMSS FFCC--1100//FFCC--2200''''

     ````CCoommppaattiibbiilliittyy wwiitthh nnoonn--LLiinnuuxx pprrooggrraammss''''

     ````CCoommppaattiibbiilliittyy,, ffoorrmmaattttiinngg''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--22..xx''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--22..xx ffiillee mmaarrkkss''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--33..xx''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--44..0022''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--44..0022 aanndd rraaww aacccceessss mmooddee''''

     ````CCoommppaattiibbiilliittyy,, ffttaappee--44..0022 aanndd ttaappee bblloocckkss''''

     ````CCoommppaattiibbiilliittyy,, MMTTBBSSFF,, EEOODD wwiitthh ffttaappee--22..xx''''


     ````CCoommppiillee ttiimmee ccoonnffiigguurraattiioonn''''

     ````CCoommppiillee ttiimmee ccoonnffiigguurraattiioonn,, hhaarrddwwaarree''''

     ````CCoommpprreessssiioonn ddeevviicceess''''

     ````CCoommpprreessssiioonn,, ffiixxeedd bblloocckk ssiizzee''''

     ````CCoommpprreessssiioonn,, ggeenneerraall ddiissccuussssiioonn''''

     ````CCoommpprreessssiioonn,, sswwiittcchh oonn aanndd ooffff''''

     ````CCoonnff..mmoodduulleess aanndd DDiittttoo EEZZ,, eexxaammppllee''''

     ````CCoonnff..mmoodduulleess aanndd ffttaappee''''

     ````CCoonnff..mmoodduulleess,, eexxaammpplleess''''

     ````CCOONNFFIIGG__FFDDCC__BBAASSEE''''

     ````CCOONNFFIIGG__FFDDCC__DDMMAA''''

     ````CCOONNFFIIGG__FFDDCC__IIRRQQ''''

     ````CCOONNFFIIGG__FFTT__PPRROOCC__FFSS''''

     ````CCOONNFFIIGG__MMOODDVVEERRSSIIOONNSS''''

     ````CCOONNFFIIGG__NNOO__TTRRAACCEE''''

     ````CCOONNFFIIGG__NNOO__TTRRAACCEE__AATT__AALLLL''''

     ````CCoonnffiigguurraattiioonn,, ccoommppiillee ttiimmee''''

     ````CCoonnffiigguurraattiioonn,, ccoommppiillee ttiimmee,, hhaarrddwwaarree''''

     ````CCoonnffiigguurraattiioonn,, llooaadd ttiimmee''''

     ````CCoonnffiigguurraattiioonn,, pprrooccffss''''

     ````CCoonnffiigguurriinngg mmooddpprroobbee,, ccoonnff..mmoodduulleess''''

  1100..77..  DD


     ````DDeebbuuggggiinngg mmeessssaaggeess,, eexxaammpplleess''''

     ````DDeebbuuggggiinngg ooppttiioonnss''''

     ````DDeebbuuggggiinngg oouuttppuutt,, rreedduucciinngg''''

     ````DDEECC AAllpphhaa''''

     ````DDeevvffss ssuuppppoorrtt''''

     ````DDeevviiccee nnaammeess,, ddeevvffss''''

     ````DDeevviicceess''''

     ````DDeevviicceess ccrreeaattiioonn''''

     ````DDeevviicceess,, <<eemm>>ffttaappee--22..xx<<//eemm>>''''

     ````DDeevviicceess,, <<eemm>>ffttaappee--33..0044dd<<//eemm>> ((aanndd llaatteerr vveerrssiioonnss))''''


     ````DDeevviicceess,, mmiinnoorr ddeevviiccee nnuummbbeerr''''

     ````DDeevviicceess,, nnuummbbeerr ooff''''

     ````DDeevviicceess,, rraaww aacccceessss''''

     ````DDeevviicceess,, rreewwiinnddiinngg''''

     ````DDeevviicceess,, ttaabbllee''''

     ````DDiissccuussssiioonn ffoorruumm''''

     ````DDiittttoo DDaasshh''''

     ````DDmmaa mmeemmoorryy''''

     ````DDooccuummeennttaattiioonn''''

     ````DDooccuummeennttaattiioonn ssoouurrcceess''''

     ````DDooccuummeennttaattiioonn,, ffoorrmmaattttiinngg''''

     ````DDrriivvee sseelleeccttiioonn mmeetthhoodd''''

     ````DDrriivvee ssttaattuuss''''

  1100..88..  EE


     ````EEjjeeccttiinngg''''

     ````EEnndd OOff DDaattaa,, cchhaannggeess bbeettwweeeenn 22..xx aanndd llaatteerr vveerrssiioonnss''''

     ````EEnndd ooff ffiillee mmaarrkkss''''

     ````EEOODD''''

     ````EEOOFF mmaarrkkss''''

     ````EEOOFF mmaarrkkss aanndd <<eemm>>ffttaappee--22..xx<<//eemm>>''''

     ````EEOOFF mmaarrkkss aanndd <<eemm>>ffttaappee--33..0044dd<<//eemm>> aanndd bbeeyyoonndd''''

     ````EEOOFF mmaarrkkss aanndd ttaarr''''

     ````EEOOFF mmaarrkkss,, ccrreeaattiinngg''''

     ````EEOOFF mmaarrkkss,, sskkiippppiinngg bbaacckkwwaarrddss''''

     ````EEOOFF mmaarrkkss,, sskkiippppiinngg ffoorrwwaarrdd''''

     ````EEOOMM''''

     ````EErraassee tthhee ttaappee ccaarrttrriiddggee''''

     ````EExxaabbyyttee aacccceelleerraattoorr''''

     ````EExxaammppllee,, IISSAAPPnnPP aanndd ccoonnff..mmoodduulleess''''

     ````EExxaammppllee,, MMTTSSTTAATTUUSS oouuttppuutt''''

     ````EExxaammppllee,, ssyysslloogg oouuttppuutt''''

     ````EExxaammpplleess,, llooaaddiinngg,, ccoonnff..mmoodduulleess''''


     ````EEXXVVTT''''

  1100..99..  FF


     ````FFAAQQ''''

     ````FFDDCC__BBAASSEE''''

     ````FFDDCC__DDMMAA''''

     ````FFDDCC__IIRRQQ''''

     ````FFDDCC__OOPPTT''''

     ````FFiillee mmaarrkkss''''

     ````FFiillee mmaarrkkss aanndd <<eemm>>ffttaappee--22..xx<<//eemm>>''''

     ````FFiillee mmaarrkkss aanndd <<eemm>>ffttaappee--33..0044dd<<//eemm>> aanndd bbeeyyoonndd''''

     ````FFiillee mmaarrkkss aanndd ttaarr''''

     ````FFiillee mmaarrkkss,, ccrreeaattiinngg''''

     ````FFiillee mmaarrkkss,, mmaaxxiimmuumm nnuummbbeerr''''

     ````FFiillee mmaarrkkss,, sskkiippppiinngg bbaacckkwwaarrddss''''

     ````FFiillee mmaarrkkss,, sskkiippppiinngg ffoorrwwaarrdd''''

     ````FFiillee SSyysstteemm IInntteerrffaaccee''''

     ````FFllooppppyy ddrriivveerr aanndd FFttaappee''''

     ````FFllooppppyy ttaappee ddrriivveess''''

     ````FFoorrmmaattttiinngg''''

     ````FFoorrmmaattttiinngg tthhee ddooccuummeennttaattiioonn''''

     ````FFoorrmmaattttiinngg,, ccoommppaattiibbiilliittyy''''

     ````FFoorrmmaattttiinngg,, ddiiffffeerreenncceess bbeettwweeeenn ddrriivveerr vveerrssiioonnss''''

     ````FFoorrmmaattttiinngg,, ffttffoorrmmaatt''''

     ````FFrreeqquueennttllyy aasskkeedd qquueessttiioonnss''''

     ````FFSSFF''''

     ````FFSSFFMM''''

     ````FFSSRR''''

     ````FFtt__ffddcc__bbaassee,, bbppcckk--ffddcc..oo''''

     ````FFtt__ffddcc__bbaassee,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__bbaassee,, ttrraakkkkeerr..oo''''

     ````FFtt__ffddcc__ddmmaa,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__ddrriivveerr''''


     ````FFtt__ffddcc__ffcc1100,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__iirrqq,, bbppcckk--ffddcc..oo''''

     ````FFtt__ffddcc__iirrqq,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__iirrqq,, ttrraakkkkeerr..oo''''

     ````FFtt__ffddcc__mmaacchh22,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__ppaarrppoorrtt,, bbppcckk--ffddcc..oo''''

     ````FFtt__ffddcc__ppaarrppoorrtt,, ttrraakkkkeerr..oo''''

     ````FFtt__ffddcc__ppnnpp__ddeevv,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__ppnnpp__ffcctt,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__ppnnpp__vveennddoorr,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__rraattee__lliimmiitt,, bbppcckk--ffddcc..oo''''

     ````FFtt__ffddcc__rraattee__lliimmiitt,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__rraattee__lliimmiitt,, ttrraakkkkeerr..oo''''

     ````FFtt__ffddcc__tthhrreesshhoolldd,, bbppcckk--ffddcc..oo''''

     ````FFtt__ffddcc__tthhrreesshhoolldd,, ffttaappee--iinntteerrnnaall..oo''''

     ````FFtt__ffddcc__tthhrreesshhoolldd,, ttrraakkkkeerr..oo''''

     ````FFtt__ttrraacciinnggss''''

     ````FFttaappee ccoommppaattiibbiilliittyy''''

     ````FFttaappee--22..xx aanndd ffiillee mmaarrkkss''''

     ````FFttaappee--22..xx ddeevviicceess''''

     ````FFttaappee--22..xx ssuuppppoorrtt''''

     ````FFttaappee--22..xx,, ccoommppaattiibbiilliittyy''''

     ````FFttaappee--22..xx,, ffiillee mmaarrkkss''''

     ````FFttaappee--33..xx,, ccoommppaattiibbiilliittyy''''

     ````FFttaappee--44..0022,, ccoommppaattiibbiilliittyy''''

     ````FFttaappee--44..0022,, rraaww aacccceessss mmooddee ((ccoommppaattiibbiilliittyy))''''

     ````FFttaappee--44..0022,, ttaappee bblloocckkss ((ccoommppaattiibbiilliittyy))''''

     ````FFttaappee--FFAAQQ''''

     ````FFttaappee--ffoorrmmaatt..oo''''

     ````FFttaappee--HHOOWWTTOO''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__bbaassee''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__ddmmaa''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__ffcc1100''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__iirrqq''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__mmaacchh22''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__ppnnpp__ddeevv''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__ppnnpp__ffcctt''''

     ````FFttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__ppnnpp__vveennddoorr''''

     ````ffttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__rraattee__lliimmiitt''''

     ````ffttaappee--iinntteerrnnaall..oo,, fftt__ffddcc__tthhrreesshhoolldd''''

     ````FFttaappee--iinntteerrnnaall..oo,, iinnssttaallllaattiioonn''''

     ````ffttaappee--iinntteerrnnaall..oo,, mmoodduullee ooppttiioonnss''''

     ````FFttaappee--iinntteerrnnaall..oo,, uunniinnssttaallllaattiioonn''''

     ````FFttaappee--ttoooollss''''

     ````FFttaappee..oo,, iinnssttaallllaattiioonn''''

     ````FFttaappee..oo,, mmoodduullee ooppttiioonnss''''

     ````FFttaappee..oo,, uunniinnssttaallllaattiioonn''''

     ````FFTTFFMMTT__FFOORRMMAATT__TTRRAACCKK''''

     ````FFTTFFMMTT__GGEETT__PPAARRMMSS''''

     ````FFTTFFMMTT__SSEETT__PPAARRMMSS''''

     ````FFTTFFMMTT__SSTTAATTUUSS''''

     ````FFTTFFMMTT__VVEERRIIFFYY''''

     ````FFttffoorrmmaatt,, ffoorrmmaattttiinngg''''

     ````FFttmmtt,, ttaappee ccoonnttrrooll pprrooggrraamm''''

  1100..1100..  GG


     ````GGeenneerraall FFDDCC mmoodduullee ooppttiioonnss''''

  1100..1111..  HH


     ````HHaarrddwwaarree ccoonnffiigguurraattiioonn''''

     ````HHeeaaddeerr sseeggmmeennttss''''

     ````HHOOWWTTOO''''

     ````HHTTMMLL ddooccuummeennttaattiioonn''''

     ````HHuuggee bbuugg rreeppoorrttss''''

  1100..1122..  II


     ````IImmpplleemmeennttaattiioonn''''


     ````IInnffoo ddooccuummeennttaattiioonn''''

     ````IInnsseerrttiioonn iinnttoo tthhee kkeerrnneell''''

     ````IInnssmmoodd''''

     ````IInnssttaallllaattiioonn''''

     ````IInnssttaallllaattiioonn wwiitthh kkeerrnneell 22..xx..xx''''

     ````IInnssttaallllaattiioonn wwiitthh vveerryy oolldd kkeerrnneellss''''

     ````IInnssttaallllaattiioonn,, ddeevviicceess''''

     ````IInnssttaallllaattiioonn,, kkeerrnneell mmoodduulleess aanndd uuttiilliittiieess''''

     ````IInnssttaalllliinngg bbppcckk--ffddcc..oo''''

     ````IInnssttaalllliinngg ffttaappee--iinntteerrnnaall..oo''''

     ````IInnssttaalllliinngg ffttaappee..oo''''

     ````IInnssttaalllliinngg ttrraakkkkeerr..oo''''

     ````IInnssttaalllliinngg zzfftt--ccoommpprreessssoorr..oo''''

     ````IInnssttaalllliinngg zzffttaappee..oo''''

     ````IInntteell''''

     ````IInnttrroodduuccttiioonn''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCFFTTCCMMDD''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCFFTTFFOORRMMAATT''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCFFTTMMOODDEE''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCGGEETT''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCGGEETTSSIIZZEE''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCPPOOSS''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCRRDDFFTTSSEEGG''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCVVOOLLIINNFFOO''''

     ````IIooccttll ddeeffiinniittiioonn,, MMTTIIOOCCWWRRFFTTSSEEGG''''

     ````IIooccttll iinntteerrffaaccee''''

     ````IISSAAPPnnPP aanndd CCoonnff..mmoodduulleess,, eexxaammppllee''''

     ````IIssaappnnppttoooollss''''

     ````iixx8866''''

  1100..1133..  KK


     ````KKeerrnneell aauuttoo--llooaaddiinngg mmeecchhaanniissmm''''

     ````KKeerrnneell lloogg ffiilleess''''


     ````KKeerrnneell ppaarraammeetteerrss''''

     ````KKeerrnneell ssyymmbboollss,, MMOODDVVEERRSSIIOONNSS''''

     ````KKeerrnneell vv11..22..1133,, ppaattcchhiinngg tthhee kkeerrnneell''''

     ````KKeerrnneell,, ppaattcchheess''''

     ````KKeerrnneelldd''''

     ````KKeerrnneelldd,, llooaaddiinngg tthhee ddrriivveerr''''

     ````KKeerrnneelldd,, mmoodduullee lloocckkiinngg''''

     ````KKeerrnneelldd,, uussee wwiitthh ffttaappee''''

     ````KKeerrnneellss,, pprreehhiissttoorriicc,, iinnssttaallllaattiioonn''''

     ````KKmmoodd''''

     ````KKmmoodd,, llooaaddiinngg tthhee ddrriivveerr''''

     ````KKmmoodd,, mmoodduullee lloocckkiinngg''''

     ````KKmmoodd,, uussee wwiitthh ffttaappee''''

     ````KKnnoowwnn bbuuggss''''

  1100..1144..  LL


     ````LLiimmiittaattiioonnss oonn mmaaxxiimmuumm nnuummbbeerr ooff ffiillee mmaarrkkss''''

     ````LLiinnuuxx ttaappee mmaaiilliinngg lliisstt''''

     ````LLiinnuuxx vv11..22..1133''''

     ````LLiinnuuxx vv22..xx..xx,, iinnssttaallllaattiioonn ooff ffttaappee''''

     ````LLooaadd tthhee ccaarrttrriiddggee..''''

     ````LLooaadd ttiimmee ccoonnffiigguurraattiioonn''''

     ````LLooaaddiinngg tthhee ddrriivveerr''''

     ````LLooaaddiinngg tthhee ddrriivveerr wwiitthh kkeerrnneelldd''''

     ````LLooaaddiinngg tthhee ddrriivveerr wwiitthh kkmmoodd''''

     ````LLooaaddiinngg tthhee ddrriivveerr wwiitthh mmooddpprroobbee''''

     ````LLooaaddiinngg tthhee ddrriivveerr,, uuttiilliittiieess''''

     ````LLoocckk tthhee ttaappee ddrriivvee ddoooorr''''

  1100..1155..  MM


     ````MMaacchhiinneess''''

     ````MMaaiilliinngg lliisstt''''

     ````MMAAKKEEDDEEVV..ffttaappee''''

     ````MMeemmoorryy ddeeffrraaggmmeennttaattiioonn,, sswwaappoouutt''''

     ````MMeemmoorryy ffrraaggmmeennttaattiioonn''''

     ````MMiinnoorr ddeevviiccee nnuummbbeerr''''

     ````MMmmaapp''''

     ````MMooddpprroobbee,, llooaaddiinngg tthhee ddrriivveerr''''

     ````MMoodduullee ddeeppeennddeenncciieess''''

     ````MMoodduullee ooppttiioonnss,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__bbaassee,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__bbaassee,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__bbaassee,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ddmmaa,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ddrriivveerr''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ffcc1100,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__iirrqq,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__iirrqq,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__iirrqq,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__mmaacchh22,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ppaarrppoorrtt,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ppaarrppoorrtt,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ppnnpp__ddeevv,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ppnnpp__ffcctt,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__ppnnpp__vveennddoorr,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__rraattee__lliimmiitt,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__rraattee__lliimmiitt,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__rraattee__lliimmiitt,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__tthhrreesshhoolldd,, bbppcckk--ffddcc..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__tthhrreesshhoolldd,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ffddcc__tthhrreesshhoolldd,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, fftt__ttrraacciinnggss''''

     ````MMoodduullee ooppttiioonnss,, ffttaappee--iinntteerrnnaall..oo''''

     ````MMoodduullee ooppttiioonnss,, ffttaappee..oo''''

     ````MMoodduullee ooppttiioonnss,, ggeenneerraall FFDDCC ooppttiioonnss''''

     ````MMoodduullee ooppttiioonnss,, ttrraakkkkeerr..oo''''

     ````MMoodduullee ooppttiioonnss,, zzfftt--ccoommpprreessssoorr..oo''''

     ````MMoodduullee ooppttiioonnss,, zzffttaappee..oo''''

     ````MMoodduullee ssttaacckk''''

     ````MMoodduullee ssttrruuccttuurree''''

     ````MMoodduullee UUnnllooaaddiinngg''''

     ````MMoodduulleess..ccoonnff,, eexxaammpplleess''''

     ````MMOODDUULLEESSDDIIRR''''

     ````MMOODDVVEERRSSIIOONNSS''''

     ````MMOOUUNNTTAAIINN MMAACCHH--22''''

     ````MMtt aanndd zzffttaappee''''

     ````MMtt rreetteenn''''

     ````MMtt,, ttaappee ccoonnttrrooll pprrooggrraamm''''

     ````MMTTBBSSFF''''

     ````MMTTBBSSFF,, cchhaannggeess bbeettwweeeenn 22..xx aanndd llaatteerr vveerrssiioonnss''''

     ````MMTTBBSSFFMM''''

     ````MMTTBBSSRR''''

     ````MMTTCCOOMMPPRREESSSSIIOONN''''

     ````MMTTEEOOMM''''

     ````MMTTEERRAASSEE''''

     ````MMTTFFSSFF''''

     ````MMTTFFSSFFMM''''

     ````MMTTFFSSRR''''

     ````MMTTIIOOCCFFTTCCMMDD''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, FFTTFFMMTT__FFOORRMMAATT__TTRRAACCKK''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, FFTTFFMMTT__GGEETT__PPAARRMMSS''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, FFTTFFMMTT__SSEETT__PPAARRMMSS''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, FFTTFFMMTT__SSTTAATTUUSS''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, FFTTFFMMTT__VVEERRIIFFYY''''

     ````MMTTIIOOCCFFTTFFOORRMMAATT,, iiooccttll ddeeffiinniittiioonn''''

     ````MMTTIIOOCCFFTTMMOODDEE''''

     ````MMTTIIOOCCGGEETT''''

     ````MMTTIIOOCCGGEETTSSIIZZEE''''

     ````MMTTIIOOCCPPOOSS''''

     ````MMTTIIOOCCRRDDFFTTSSEEGG''''

     ````MMTTIIOOCCTTOOPP''''

     ````MMTTIIOOCCVVOOLLIINNFFOO''''

     ````MMTTLLOOAADD''''

     ````MMTTLLOOCCKK''''

     ````MMTTNNOOPP''''

     ````MMTTOOFFFFLL''''

     ````MMTTRREESSEETT''''

     ````MMTTRREETTEENN''''

     ````MMTTRREEWW''''

     ````MMTTSSEEEEKK''''

     ````MMTTSSEETTBBLLKK''''

     ````MMTTSSEETTDDEENNSSIITTYY''''

     ````MMTTSSEETTDDRRVVBBUUFFFFEERR''''

     ````MMTTSSEETTPPAARRTT''''

     ````MMTTSSTTAATTUUSS,, ssaammppllee oouuttppuutt''''

     ````MMTTTTEELLLL''''

     ````MMTTUUNNLLOOAADD''''

     ````MMTTUUNNLLOOCCKK''''

     ````MMTTWWEEOOFF''''

  1100..1166..  NN


     ````NNaammeess ooff tthhee ffttaappee ddeevviicceess,, ddeevvffss''''

     ````NNoo ttaappee ddrriivvee ffoouunndd''''

     ````NNoonn--rreewwiinnddiinngg ddeevviicceess''''

     ````NNuummbbeerr ooff ttaappee ddeevviicceess''''

  1100..1177..  OO


     ````OOffff--lliinnee''''

     ````OOppttiioonnss,, ddeebbuuggggiinngg''''

     ````OOppttiioonnss,, ttrraacciinngg''''

     ````OOuutt ooff mmeemmoorryy,, sswwaappoouutt''''

  1100..1188..  PP



     ````PPaarraammeetteerrss,, bboooott''''

     ````PPaarraammeetteerrss,, kkeerrnneell''''

     ````PPaattcchhiinngg kkeerrnneell vv11..22..1133''''

     ````PPaattcchhiinngg tthhee kkeerrnneell''''

     ````PPlluugg aanndd PPllaayy''''

     ````PPlluugg aanndd PPrraayy''''

     ````PPoossttssccrriipptt ddooccuummeennttaattiioonn''''

     ````PPrriivviilleeggeess dduurriinngg tteessttiinngg''''

     ````PPrrooccffss iinntteerrffaaccee''''

  1100..1199..  QQ


     ````QQIICC DDeevveellooppmmeenntt SSttaannddaarrdd''''

     ````QQuueerryy ttaappee ssttaattuuss''''

     ````QQuuiicckk iinnssttaallll''''

  1100..2200..  RR


     ````RRaaww aacccceessss ddeevviicceess''''

     ````RReeaadd oonnllyy ssuuppppoorrtt ffoorr <<eemm>>ffttaappee--22..xx<<//eemm>>''''

     ````RReeaaddiinngg ttaappee sseeggmmeennttss''''

     ````RReeccooggnniittiioonn bbyy ootthheerr pprrooggrraammss''''

     ````RReesseettttiinngg tthhee ttaappee ddrriivvee''''

     ````RReetteennssiioonn''''

     ````RReetteennttiioonn''''

     ````RReewwiinnddiinngg ddeevviicceess''''

     ````RReewwiinnddiinngg ddeevviicceess,, ttaappee mmoottiioonn ccoommmmaannddss''''

     ````RReewwiinnddiinngg tthhee ttaappee''''

  1100..2211..  SS


     ````SSaammppllee bbaacckkuuppss''''

     ````SSeeeekk''''

     ````SSeeggmmeennttss,, rreeaaddiinngg''''

     ````SSeelleeccttiioonn''''

     ````SSeett bblloocckk ssiizzee''''

     ````SSeett tthhee ttaappee ddrriivvee ppaarrttiittiioonn''''


     ````SSeett ttrraaccee lleevveell''''

     ````SSEETTDDEENNSSIITTYY''''

     ````SSEETTDDRRVVBBUUFFFFEERR''''

     ````SSffttaappee..oo''''

     ````SSiizzee ooff aa vvoolluummee''''

     ````SSkkiipp ttoo eenndd ooff ddaattaa''''

     ````SSkkiippppiinngg bbaacckkwwaarrddss oovveerr ffiillee mmaarrkkss''''

     ````SSkkiippppiinngg bbaacckkwwaarrddss oovveerr ttaappee bblloocckkss''''

     ````SSkkiippppiinngg ffoorrwwaarrdd oovveerr ffiillee mmaarrkkss''''

     ````SSkkiippppiinngg ffoorrwwaarrdd oovveerr ttaappee bblloocckkss''''

     ````SSooffttwwaarree''''

     ````SSttaattuuss qquueerryy''''

     ````SSuubbssccrriibbiinngg ttoo lliinnuuxx--ttaappee''''

     ````SSuuppeerr uusseerr,, aavvooiiddiinngg''''

     ````SSwwaappoouutt''''

     ````SSyysslloogg,, ssaammppllee oouuttppuutt''''

  1100..2222..  TT


     ````TTaappee bblloocckkss''''

     ````TTaappee bblloocckkss,, sseeeekk''''

     ````TTaappee bblloocckkss,, sskkiippppiinngg bbaacckkwwaarrddss''''

     ````TTaappee bblloocckkss,, sskkiippppiinngg ffoorrwwaarrdd''''

     ````TTaappee ccoonnttrrooll pprrooggrraamm,, mmtt,, ffttmmtt''''

     ````TTaappee ddeevviiccee,, <<eemm>>ffttaappee--22..xx<<//eemm>>''''

     ````TTaappee ddeevviicceess''''

     ````TTaappee ddeevviicceess,, <<eemm>>ffttaappee--33..0044dd<<//eemm>> ((aanndd llaatteerr vveerrssiioonnss))''''

     ````TTaappee ddeevviicceess,, mmiinnoorr ddeevviiccee nnuummbbeerr''''

     ````TTaappee ddeevviicceess,, nnuummbbeerr ooff''''

     ````TTaappee ddeevviicceess,, ttaabbllee''''

     ````TTaappee mmoottiioonn ccoommmmaannddss,, rreewwiinnddiinngg ddeevviicceess''''

     ````TTaappee ooppeerraattiioonnss''''

     ````TTaappee ppoossiittiioonn''''

     ````TTaappee ssttaattuuss''''


     ````TTaappee ssttrreettcchh''''

     ````TTaarr aanndd ffiillee mmaarrkkss''''

     ````TTeellll ttaappee ppoossiittiioonn''''

     ````TTeesstt rruunnss,, ootthheerr tteessttss''''

     ````TTeessttiinngg''''

     ````TTeessttiinngg,, aauuttoo rreewwiinndd''''

     ````TTeessttiinngg,, nnoonn rreewwiinnddiinngg ddeevviicceess''''

     ````TTeessttiinngg,, rreeaaddiinngg ddaattaa''''

     ````TTeessttiinngg,, ssaammppllee bbaacckkuuppss''''

     ````TTeessttiinngg,, ttaappee ssttaattuuss''''

     ````TTeessttiinngg,, ttaarr aanndd mmuullttiippllee vvoolluummeess''''

     ````TTeessttiinngg,, vveerriiffyy ddaattaa''''

     ````TTeessttiinngg,, wwrriittiinngg ddaattaa''''

     ````TTrraaccee lleevveell,, sseettttiinngg''''

     ````TTRRAACCEE__FFLLAAGGSS''''

     ````TTrraacciinngg ooppttiioonnss''''

     ````TTrraacciinngg,, ssaammppllee oouuttppuutt''''

     ````TTrraakkkkeerr..oo,, fftt__ffddcc__bbaassee''''

     ````TTrraakkkkeerr..oo,, fftt__ffddcc__iirrqq''''

     ````TTrraakkkkeerr..oo,, fftt__ffddcc__ppaarrppoorrtt''''

     ````TTrraakkkkeerr..oo,, fftt__ffddcc__rraattee__lliimmiitt''''

     ````TTrraakkkkeerr..oo,, fftt__ffddcc__tthhrreesshhoolldd''''

     ````TTrraakkkkeerr..oo,, iinnssttaallllaattiioonn''''

     ````TTrraakkkkeerr..oo,, mmoodduullee ooppttiioonnss''''

     ````TTrraakkkkeerr..oo,, uunniinnssttaallllaattiioonn''''

  1100..2233..  UU


     ````UUnn--iinnssttaalllliinngg ddeevviicceess''''

     ````UUnn--iinnssttaalllliinngg <<eemm>>ffttaappee<<//eemm>>''''

     ````UUnneexxppeecctteedd ssttrraayy iinntteerrrruupptt''''

     ````UUnniinnssttaallll''''

     ````UUnniinnssttaalllliinngg bbppcckk--ffddcc..oo''''

     ````UUnniinnssttaalllliinngg ffttaappee--iinntteerrnnaall..oo''''


     ````UUnniinnssttaalllliinngg ffttaappee..oo''''

     ````UUnniinnssttaalllliinngg ttrraakkkkeerr..oo''''

     ````UUnniinnssttaalllliinngg zzfftt--ccoommpprreessssoorr..oo''''

     ````UUnniinnssttaalllliinngg zzffttaappee..oo''''

     ````UUnnkknnoowwnn vveennddoorr iidd''''

     ````UUnnllooaadd tthhee ccaarrttrriiddggee..''''

     ````UUnnlloocckkiinngg tthhee ttaappee ddrriivvee ddoooorr''''

     ````UUppddaattiinngg ooff hheeaaddeerr sseeggmmeennttss''''

     ````UUttiilliittiieess,, llooaaddiinngg tthhee ddrriivveerr''''

  1100..2244..  VV


     ````vv11..22..1133''''

     ````vv11..22..1133,, cchhaannggiinngg tthhee kkeerrnneell bbyy hhaanndd''''

     ````vv11..22..1133,, ppaattcchhiinngg tthhee kkeerrnneell''''

     ````vv22..xx..xx,, iinnssttaallllaattiioonn ooff ffttaappee''''

     ````VVeerrssiioonneedd KKeerrnneell SSyymmbboollss''''

     ````VVFFSS IInntteerrffaaccee''''

     ````VVFFSS iinntteerrffaaccee,, iiooccttllss''''

     ````VViieewwiinngg HHTTMMLL ddooccuummeennttaattiioonn''''

     ````VVoolluummee bblloocckk ssiizzee''''

     ````VVoolluummee ccoommpprreessssiioonn''''

     ````VVoolluummee iinnffoorrmmaattiioonn''''

     ````VVoolluummee nnuummbbeerr''''

     ````VVoolluummee ssiizzee''''

     ````VVoolluummee ttaabbllee''''

     ````VVoolluummee ttaabbllee mmaanniippuullaattiioonn''''

     ````VVTTBBLL lliimmiittaattiioonnss''''

     ````VVttbbllcc,, vvoolluummee ttaabbllee mmaanniippuullaattiioonn''''

  1100..2255..  WW


     ````WWaakkeeuupp ttyyppee mmiissmmaattcchh''''

     ````WWEEOOFF''''

     ````WWrriittiinngg ffiillee mmaarrkkss''''



  1100..2266..  ZZ


     ````ZZfftt--ccoommpprreessssoorr..oo,, iinnssttaallllaattiioonn''''

     ````ZZfftt--ccoommpprreessssoorr..oo,, mmoodduullee ooppttiioonnss''''

     ````ZZfftt--ccoommpprreessssoorr..oo,, uunniinnssttaallllaattiioonn''''

     ````ZZffttaappee aanndd ffiillee mmaarrkkss''''

     ````ZZffttaappee,, ddeevviiccee ttaabbllee''''

     ````ZZffttaappee,, ddeevviicceess''''

     ````ZZffttaappee..oo,, iinnssttaallllaattiioonn''''

     ````ZZffttaappee..oo,, mmoodduullee ooppttiioonnss''''

     ````ZZffttaappee..oo,, uunniinnssttaallllaattiioonn''''














































