home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / mini / ZIP-Drive < prev    next >
Text File  |  1998-10-14  |  36KB  |  1,123 lines

  1.   Zip Drive Mini-HOWTO
  2.   Kyle Dansie, dansie@ibm.net
  3.   v2.2, 26 August 1998
  4.  
  5.   This Document provides a quick reference quide on setting up and using
  6.   the Iomega ZIP drive with Linux.
  7.   ______________________________________________________________________
  8.  
  9.   Table of Contents
  10.  
  11.  
  12.   1. Introduction
  13.  
  14.      1.1 Home of this document
  15.  
  16.   2. Quick Start
  17.  
  18.   3. The ZIP drive
  19.  
  20.      3.1 Parallel port version
  21.      3.2 SCSI external version
  22.         3.2.1 The ZIP ZOOM host adapter
  23.      3.3 The SCSI Internal version
  24.      3.4 The ZIP Plus - IMM driver
  25.      3.5 ATAPI version
  26.      3.6 IDE version
  27.  
  28.   4. Configuring a kernel for the ZIP drive
  29.  
  30.      4.1 SCSI version
  31.      4.2 PPA driver for 1.2.13
  32.      4.3 PPA driver in current kernels
  33.      4.4 PPA command line parameters
  34.  
  35.   5. Using the ZIP drive
  36.  
  37.      5.1 Identifying the drive at boot time
  38.      5.2 Fdisk, mke2fs, mount, etc.
  39.      5.3 An existing DOS formatted disk
  40.      5.4 Re-format as a native Linux disk
  41.      5.5 The ZIP Tools disk
  42.  
  43.   6. Performance
  44.  
  45.   7. Frequently asked questions
  46.  
  47.      7.1 Can I plug a printer into the parallel ZIP drive ?
  48.      7.2 Do you plan to support EPP/ECP ports in PPA ?
  49.      7.3 Can I run Linux from a ZIP drive ?
  50.      7.4 Can I boot from the ZIP drive ?
  51.      7.5 Why does Iomega use partition number 4 ?
  52.      7.6 How can I have the disk mounted at boot time ?
  53.      7.7 What happens if there is no disk inserted when I boot ?
  54.      7.8 Can I use the parallel drive as a real SCSI disk ?
  55.      7.9 Can PPA be used with Iomega's parallel port tape drives ?
  56.      7.10 Will PPA work with the parallel port SyQuest EZ135 ?
  57.  
  58.   8. Getting more current information
  59.  
  60.  
  61.  
  62.   ______________________________________________________________________
  63.  
  64.  
  65.  
  66.  
  67.   1.  Introduction
  68.  
  69.   The Iomega ZIP drive is a popular, removable media disk drive.  It is
  70.   avaliable in several versions.
  71.  
  72.   ╖  Parallel Port
  73.  
  74.   ╖  SCSI
  75.  
  76.   ╖  IDE - ATAPI
  77.  
  78.   ╖  Plus
  79.  
  80.      The most popular seems to be the Parallel port version. It has been
  81.      around a long time and it is low cost. The SCSI version has also
  82.      been around for a while but it needs a scsi card that many people
  83.      do not have already, so it it not quite as popular. The ATAPI
  84.      version now seems to be more available. The Plus is the newer
  85.      version of the ZIP drive.  It has the capability to detect what
  86.      port its plugged into, scsi or parallel. This document will focus
  87.      on the Parallel port version, but also offer some tips for other
  88.      versions.
  89.  
  90.  
  91.   This document incorporates information collected and published by
  92.   others, in particular:
  93.  
  94.   ╖  Grant Guenther, grant@torque.net
  95.  
  96.   ╖  Scot Wilcoxon, sewilco@fielday.mn.org
  97.  
  98.   ╖  Joe Mack, mack@ncifcrf.gov
  99.  
  100.   ╖  Byron Jeff, byron@cc.gatech.edu
  101.  
  102.  
  103.   I thank them for their important contributions, and accept
  104.   responsibility for any errors that I have introduced.
  105.  
  106.   A special thanks to Grant Guenther who wrote the 0.26 version of the
  107.   ppa program and also wrote the original version of this HOWTO.  If you
  108.   find any mistakes or oversights in this document, please let me know.
  109.   dansie@ibm.net
  110.  
  111.  
  112.   1.1.  Home of this document
  113.  
  114.   The most current version of this document will reside at
  115.   <http://www.njtcom.com/dansie/zip-drive.html>
  116.  
  117.  
  118.  
  119.   2.  Quick Start
  120.  
  121.   OK so you have purchased a new zip drive and now you want to use it.
  122.   Some distributions have the modules already built. You can try insmod
  123.   ppa for starters. (Make sure you have it hooked up and a disk
  124.   inserted).  If the ppa program is not there, then configure the
  125.   kernel.  My machine has 2 parallel ports, one for the zip and one for
  126.   the printer.  This makes things easy, no cable switching.
  127.  
  128.   Configure the kernel:
  129.  
  130.   ╖  cd /usr/src/linux
  131.  
  132.  
  133.   ╖  make xconfig
  134.  
  135.   ╖  scsi support = Y
  136.  
  137.   ╖  scsi disk support = Y
  138.  
  139.   ╖  Iomega zip support as a module
  140.  
  141.   ╖  printer support also as a module
  142.  
  143.   ╖  save it and exit
  144.  
  145.   ╖  make dep
  146.  
  147.   ╖  make clean
  148.  
  149.   ╖  make zImage or zlilo or zdisk
  150.  
  151.   ╖  make modules
  152.  
  153.   ╖  make mdoules_install
  154.  
  155.   Now to use the drive:
  156.  
  157.   ╖  load the module insmod ppa
  158.  
  159.   ╖  build a mounting point. mkdir /zip
  160.  
  161.   ╖  insert a preformatted windoze type disk into the drive.
  162.  
  163.   ╖  mount the disk.  mount -t vfat /dev/sda4 /zip
  164.  
  165.   ╖  use any standard file commands as in  l /zip, ls /zip, df, cp,
  166.  
  167.   ╖  when you are finished  umount /zip
  168.  
  169.   If you had trouble with any of the previous steps, see the following
  170.   sections for more detailed instructions.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.   3.  The ZIP drive
  177.  
  178.   There are at least five or six versions of the Iomega ZIP 100 drive.
  179.   They all accept special cartridges resembling a 3.5" floppy disk that
  180.   hold 100 megabytes of data.  The disks actually hold 96 cylinders of
  181.   2048 sectors each holding 512 bytes.  This would normally be called 96
  182.   Megabytes.
  183.  
  184.   The external drive comes in these types:
  185.  
  186.   ╖  Parallel port
  187.  
  188.   ╖  SCSI
  189.  
  190.   ╖  Plus
  191.  
  192.   The internal drive comes in these types:
  193.  
  194.   ╖  SCSI
  195.  
  196.   ╖  IDE
  197.  
  198.  
  199.   ╖  ATAPI
  200.  
  201.   The internal versions can be mounted in 3.5 or 5.25 drive slots.  The
  202.   external versions are in a small blue plastic case enclosure, powered
  203.   by an external wall brick.
  204.  
  205.   All the drives have a large pushbutton on the front of the drive.
  206.   This is used to eject the disk.  Linux locks the door while using the
  207.   drive, but if the button is pressed while the door is locked, the ZIP
  208.   drive will remember and eject the disk as soon as the software unlocks
  209.   it.
  210.  
  211.  
  212.   3.1.  Parallel port version
  213.  
  214.   The parallel port ZIP drive has two DB25 connectors, the male (DB25M)
  215.   should be connected with the supplied parallel cable to your
  216.   computer's parallel port.  The other (female, DB25F) is intended to
  217.   support a chained printer.  Linux 2.0.x does not currently support
  218.   simultaneous use of both a ZIP drive and a chained printer.  A work-
  219.   around is possible using loadable modules.  There are no configuration
  220.   switches. This will likely change in future versions. Check the Linux
  221.   Parallel Port Sharing Project
  222.   <http://www.cyberelk.demon.co.uk/parport.html> for more information.
  223.  
  224.  
  225.   The Linux driver comes in a couple of different versions. The 0.26
  226.   version of the ppa.c program ships standard with the 2.0.x kernels.
  227.   Check out
  228.  
  229.   David Campbell's page <http://www.torque.net/~campbell/> for the more
  230.   current version of this program. At the time of this writing the
  231.   current version is 1.41.
  232.  
  233.  
  234.   The parallel port ZIP drive is compatible with several types of
  235.   parallel ports, but currently the 0.26 version of the Linux driver
  236.   supports only the Standard and bi-directional ports. The newer
  237.   versions support EPP.  If your parallel port has configuration
  238.   switches (in hardware or on a CMOS setup screen) be sure to set the
  239.   port into one of those two modes for the 0.26 program.
  240.  
  241.   Be sure that all cables are firmly attached.
  242.  
  243.   Also see section ``Getting more information''
  244.  
  245.  
  246.   3.2.  SCSI external version
  247.  
  248.   The external SCSI version of the ZIP drive has two DB25F connectors,
  249.   and two configuration switches.  One switch selects the drive's target
  250.   address. The choice is limited to target 5 or 6.  The other enables an
  251.   internal terminator, in case the drive is the last one on a chain.
  252.   The 25 pin SCSI connectors use the familiar Macintosh style wiring.
  253.   The drive is shipped with a Macintosh type cable, but standard cables
  254.   and converters are easily obtained if you are using a host adapter
  255.   with a Centronics or high-density connector.
  256.  
  257.   I have not seen an internal SCSI drive, but I would expect it to have
  258.   a standard 50 pin DIP header SCSI connector and the same two switches.
  259.  
  260.   Make sure that the target address you choose does not conflict with
  261.   any other SCSI devices you may have on the same bus.  Also be sure
  262.   that the physically last drive in a chain has termination enabled, or
  263.   an external terminator installed.
  264.  
  265.   If you have an internal SCSI disk or CD-rom, and you connect your ZIP
  266.   drive to the existing adapter, you should check to see if there are
  267.   any terminators on the card that must be removed.  Only the two
  268.   extreme ends of the SCSI bus should be terminated.  If your bus is
  269.   partly internal and partly external, there should be one terminator on
  270.   the last external device and one on the last internal device, but no
  271.   terminators on the adapter card itself.
  272.  
  273.   Be sure that all cables are firmly attached.
  274.  
  275.  
  276.   3.2.1.  The ZIP ZOOM host adapter
  277.  
  278.   Iomega markets a SCSI host adapter under the name ZIP Zoom.  This is
  279.   actually based on the design of the Adaptec AHA1520 family of
  280.   adapters.  It has an external Macintosh type DB25F connector,
  281.   compatible with the cable that comes with the ZIP drive.
  282.  
  283.   Linux supports this adapter with the aha152x driver.
  284.  
  285.  
  286.   3.3.  The SCSI Internal version
  287.  
  288.  
  289.  
  290.   Install hardware as described in the "Installation and Reference
  291.   Guide" noting which SCSI ID, IRQ and I/O Port Address are being used.
  292.   (You'll need this info later.) Things will go smother if the drive and
  293.   adapter card use different SCSI ID's.
  294.  
  295.   Recompile the kernel after configuring it to include 'SCSI', 'SCSI
  296.   disk' and 'AHA152X/2825' support. INSTALL NEW KERNEL :-(
  297.  
  298.   Determine what your kernel command line is:
  299.  
  300.    aha152x=[I/O Port][,IRQ][,SCSI ID][,RECONNECT][,PARITY]
  301.  
  302.   For example :
  303.  
  304.     aha152x=0x140,10,7,1
  305.  
  306.   If your using LILO add your kernel command line to your lilo.conf file
  307.   using the append command.
  308.  
  309.   (ie. append = "aha152x=0x140,10,7,1")
  310.  
  311.   If your using LOADLIN add your kernel command line to the command you
  312.   use to initiate loadlin.
  313.  
  314.   (ie. loadlin c:\vmlinuz root=/dev/hda3 aha152x=0x140,10,5,1 ro)
  315.  
  316.  
  317.  
  318.  
  319.   3.4.  The ZIP Plus - IMM driver
  320.  
  321.   This is a newer version of the external Zip drive. The
  322.    Zip Plus  does not use the ppa driver, instead it uses the
  323.    imm  driver.  Philippe Andersson sent in this excellent section on
  324.   the imm driver for the Zip Plus.  Thanks Philippe.
  325.  
  326.  
  327.  
  328.   Warning: the development of this driver is in alpha stage, which means
  329.   that 1./ you won't find it in the normal linux kernel source tree (nor
  330.   will you be able to select it from make config and friends, of course)
  331.   and 2./ it might not work in your specific setup. But don't fear --
  332.   just go ahead and test it.
  333.  
  334.   First, rebuild your kernel to include the following items:
  335.  
  336.  
  337.   ╖  modules support
  338.  
  339.   ╖  SCSI support
  340.  
  341.   ╖  SCSI Disk support
  342.  
  343.   ╖  lp as a module (if you need it)
  344.  
  345.   You'll notice we didn't select any SCSI low-level driver. That's ok --
  346.   we'll build it separately later.
  347.  
  348.   Then, you need to get the driver source code from Dave Campbell's home
  349.   page (http://www.torque.net/~campbell/imm.tar.gz
  350.   <http://www.torque.net/~campbell/imm.tar.gz>). Version 0.17 is the
  351.   current one at the time of writing (Aug. 98). Unzip it and untar it
  352.   somewhere (under /usr/src, for instance). Then just run make. You'll
  353.   get the module you need (imm.o). Copy it to /lib/modules/$(uname
  354.   -r)/scsi.
  355.  
  356.   If your lp module was loaded (check with lsmod(1)), unload it (rmmod
  357.   lp), then load imm.o (insmod imm) and you're all set basically.
  358.  
  359.   If the ZIP drive was not connected and powered on at the time, you'll
  360.   get the message "init_module: Device or resource busy", and the module
  361.   won't load. (By the way, it looks like you don't need to switch your
  362.   PC off to connect the ZIP -- just make sure the module is not loaded
  363.   and the drive is turned off, then plug it in, turn the drive on, and
  364.   load the module.)
  365.  
  366.   If the ZIP was connected and powered on, but there was no disk in, the
  367.   module will load all right, but you'll get the message that it can't
  368.   read the disk partition table. This is ok, as the partition table will
  369.   be automatically read when you insert a ZIP disk.
  370.  
  371.   If there was a ZIP disk in, you'll get the full information displayed,
  372.   including a list of partitions defined on the disk and its Write
  373.   Protect status. Here is a sample load-time message:
  374.  
  375.  
  376.   vger:~# insmod imm
  377.   imm: Version 0.17
  378.   imm: Probing port 03bc
  379.   imm: Probing port 0378
  380.   imm:     SPP port present
  381.   imm:     ECP with a 16 byte FIFO present
  382.   imm:     PS/2 bidirectional port present
  383.   imm:     Passed Intel bug check.
  384.   imm: Probing port 0278
  385.   scsi0 : Iomega ZIP Plus drive
  386.   scsi : 1 host.
  387.     Vendor: IOMEGA    Model: ZIP 100 PLUS      Rev: J.66
  388.     Type:   Direct-Access                      ANSI SCSI revision: 02
  389.   Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  390.   SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  391.   sda: Write Protect is off
  392.    sda: sda1
  393.   vger:~#
  394.  
  395.  
  396.  
  397.   One last remark to mention that this version of the driver also locks
  398.   the drive door while the disk is mounted. If the eject button is
  399.   pressed in this situation, nothing happens, but the drive "remembers"
  400.   and ejects the disk as soon as it is dismounted.
  401.  
  402.  
  403.  
  404.  
  405.   3.5.  ATAPI version
  406.  
  407.   There was an IDE version of the drive produced for a while.  I think
  408.   that for the most part this has been replaced by the ATAPI version.
  409.  
  410.   Donald Stidwell sent in these comments on the ATAPI version. Thanks
  411.   Don.
  412.  
  413.   I use an ATAPI Zip drive and it works with both 2.0.32 and 2.0.33
  414.   kernels.  I've used it under both RH 5.0 and OpenLinux 1.2 (my current
  415.   used distribution).  To get it to work under OpenLinux, I just enabled
  416.   ATAPI floppy support in the kernel.  OpenLinux does not have this
  417.   support compiled in by default.
  418.  
  419.   No other drivers are needed.  It will mount as an extended partition
  420.   on partition 4.  I.E, mine mounts on HDB4.  I mount it under /mnt/zip
  421.   as noauto, although I don't suppose there would be any real problem
  422.   with automounting.  I just wonder about ejecting disks.  I always
  423.   dismount the drive before ejecting a cartridge.
  424.  
  425.   There are more detailed instructions for the ATAPI install in the
  426.   Linux Gazette May 1998 issue. See the 2 cent tip section.
  427.  
  428.   <http://www.linuxgazette.com/issue28/lg_tips28.html#atapi>
  429.  
  430.  
  431.  
  432.   3.6.  IDE version
  433.  
  434.  
  435.   I have not used the IDE version. Eric Backus sent in these comments.
  436.   Thanks Eric.
  437.  
  438.   I have one of these.  It came with my Gateway 2000 computer a year
  439.   ago.  I think most of these were shipped by large OEM companies like
  440.   this, before the ATAPI version of the ZIP drive was available.
  441.  
  442.   The good news about this drive: no kernel modules or modifications are
  443.   needed to support it.  It looks to the kernel like an IDE hard drive.
  444.   It worked for me with no effort with kernel 2.0.31 and 2.0.32.
  445.  
  446.   The bad news about this drive: because it doesn't use ATAPI, you can't
  447.   use the SCSI-to-ATAPI translation, which means you can't use mtools to
  448.   write-protect disks (or to eject them, for that matter).
  449.  
  450.  
  451.  
  452.   4.  Configuring a kernel for the ZIP drive
  453.  
  454.   To use the ZIP drive with Linux, you must have a kernel configured
  455.   with support for the SCSI system, support for SCSI disks, and support
  456.   for the host adapter you are using.  If you are not familiar with
  457.   building a kernel, you should read up on the Linux Kernel HOWTO
  458.   <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> for information.
  459.  
  460.   You must begin the process of building a kernel with the configuration
  461.   step.  Here, you identify the specific kernel components that you
  462.   need. First step  cd /usr/src/linux. There are several ways to
  463.   actually do the configuration. Under X windows I use make xconfig.
  464.   There is also make menuconfig or make config for command line prompts.
  465.   The easiest way is with xconfig.
  466.  
  467.   In the section SCSI Support set SCSI support = Y.  Also set SCSI disk
  468.   support = Y.
  469.  
  470.   In the section SCSI low-level drivers you want to set IOMEGA Parallel
  471.   Port ZIP drive SCSI support = M. The M stands for modules.
  472.  
  473.   In the section Character Devices find and set Parallell Printer
  474.   support = M
  475.  
  476.   If you are a bit unsure about any of this, use zdisk for the make
  477.   step. This will build and install the kernel to floppy. If you screw
  478.   it up somehow, you still have a good bootable system on the hard
  479.   drive.
  480.  
  481.   Now build the kernel with these steps:
  482.  
  483.   ╖  make dep
  484.  
  485.   ╖  make clean
  486.  
  487.   ╖  make zImage or zlilo or zdisk
  488.  
  489.   ╖  make modules
  490.  
  491.   ╖  make mdoules_install
  492.  
  493.   hint if you want to create an output log of the make zImage step you
  494.   can use
  495.  
  496.  
  497.           make zImage 2>&1 | tee zImage.out
  498.  
  499.  
  500.  
  501.  
  502.  
  503.   This is really a good thing to do, if you have compile errors or other
  504.   conflicts in the configuration, now you have a file with the error
  505.   messages or compile errors. This makes asking for help much easier.
  506.  
  507.   You also need to load the modules somewhere. On my system I just added
  508.   a couple of lines to the boot.local file.
  509.  
  510.   ╖  insmod ppa
  511.  
  512.   ╖  insmod lp
  513.  
  514.      My system is Suse 5.0 and this file is in /etc/rc.d. The location
  515.      of this file will vary by distribution, but there will be a file
  516.      somewhere, for local changes to be made at start up time. You
  517.      should use the file that is applicable for your distribution.
  518.  
  519.   Now shutdown and reboot.
  520.  
  521.   You can also build all or part of the SCSI system as modules.  If you
  522.   do this, be sure to load scsi.o, then sd.o and finally the driver for
  523.   your host adapter, before you try to access the ZIP drive.
  524.  
  525.  
  526.  
  527.  
  528.  
  529.   4.1.  SCSI version
  530.  
  531.  
  532.   If you already have a SCSI disk in your system, and you are connecting
  533.   the ZIP drive to the same controller, there is no additional kernel
  534.   configuration required.  Otherwise, you will most likely have to build
  535.   a new kernel.
  536.  
  537.   If you are building a kernel to support the SCSI version of the ZIP
  538.   drive, you should select SCSI support and SCSI disk support.  You must
  539.   also select a driver for the interface card you will use. If you have
  540.   a ZIP Zoom, select the aha152x driver.
  541.  
  542.   Be sure to read the documentation for your adapter in the SCSI HOWTO
  543.   and any README files in the drivers/scsi subdirectory of the Linux
  544.   source tree.  Pay attention to command line parameters that you might
  545.   have to use to help the kernel initialise your adapter.
  546.  
  547.   For instance, if you are using the ZIP Zoom card, you will have to add
  548.   something like
  549.  
  550.  
  551.  
  552.                  aha152x=0x340,11,7,1
  553.  
  554.  
  555.  
  556.  
  557.   to the boot command (or include it in your /etc/lilo.conf file in an
  558.   append clause).  This tells the driver the port address and IRQ of
  559.   your ZIP Zoom card - be sure to use the numbers that correspond to the
  560.   way your jumpers are set.
  561.  
  562.   You should also read Paul Gortmaker's BOOTPROMPT HOWTO
  563.   <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html> for
  564.   information about configuring your kernel with LILO or LOADLIN.
  565.  
  566.  
  567.   4.2.  PPA driver for 1.2.13
  568.  
  569.  
  570.   The 2.0.x kernel has been released for a very long time now. If you
  571.   are still on the 1.2.13 or anything older than the 2.0.x  Please
  572.   Upgrade. I will not answer any questions about these old releases and
  573.   I doubt that any of the developers will.
  574.  
  575.  
  576.   4.3.  PPA driver in current kernels
  577.  
  578.   Since version 1.3.74 the ppa driver has been a standard part of the
  579.   kernel.  There were some changes to other parts of the kernel around
  580.   1.3.78 that required an interim workaround, but since 1.3.85 the
  581.   driver has been quite stable at version 0.26.  Since the code-freeze
  582.   for Linux 2.0 is now in effect,  I expect that 0.26 will be in the
  583.   next stable kernel.
  584.  
  585.   To build a kernel with ppa support, include SCSI support, SCSI disk
  586.   support and select the Iomega ZIP / PPA-3 support from the list of
  587.   low-level SCSI adapters.  You can also build the driver as a loadable
  588.   module.
  589.  
  590.   You can use command line parameters in /etc/lilo.conf or with insmod
  591.   to adjust the driver.   This is all documented in
  592.   drivers/scsi/README.ppa in the kernel source tree.  I've included a
  593.   summary in the next section.
  594.  
  595.   If you want to use both the lp and ppa drivers on the same parallel
  596.   port, you must build both as loadable modules and load one or the
  597.   other at any point in time, but not both.
  598.  
  599.   Linux's loadable module features are becoming more powerful, and
  600.   correspondingly more complex, every day.  You should read the file
  601.   Documentation/modules.txt in the kernel source tree, as a starting
  602.   point.
  603.  
  604.  
  605.   4.4.  PPA command line parameters
  606.  
  607.   If you have ppa built into your kernel, you can adjust its parameters
  608.   from the command line of LILO or LOADLIN with the following syntax:
  609.  
  610.  
  611.  
  612.               ppa=base[,speed_high[,speed_low[,nybble]]]
  613.  
  614.  
  615.  
  616.  
  617.   Where base is the i/o address of your parallel port, speed_high is a
  618.   timing constant for certain fast loops in the driver, speed_low is a
  619.   similar timing parameter for some slower loops and nybble is a flag to
  620.   force the driver to use 4-bit, or nybble mode, even if it wants to do
  621.   otherwise.
  622.  
  623.   For an example, the defaults could be specified as:
  624.  
  625.  
  626.  
  627.               ppa=0x378,1,6,0
  628.  
  629.  
  630.  
  631.  
  632.  
  633.   5.  Using the ZIP drive
  634.  
  635.   If you have built in all the required components, the kernel should
  636.   recognize your adapter and drive at boot time.  If you are using a
  637.   loadable module for your driver, the following discussion applies once
  638.   that module is loaded.
  639.  
  640.   For the most part, the SCSI and parallel versions of the drive behave
  641.   identically, except that the parallel version is somewhat slower.
  642.  
  643.  
  644.   5.1.  Identifying the drive at boot time
  645.  
  646.   When your system boots it should display several pieces of information
  647.   about your adapter, your drive, and the disk in the drive.  If you do
  648.   not have a disk in the drive, some of this information will be missing
  649.   and will only appear when you insert a disk and then touch the drive
  650.   (make some attempt to access it).  Beginning users are advised to boot
  651.   their system with a disk in the drive - things are less confusing that
  652.   way !
  653.  
  654.   Exactly where these messages will appear depends on how your system is
  655.   configured.  Often they will be displayed to your system console, but
  656.   they may be diverted into a log file such as /var/adm/messages.
  657.   Usually, you can retrieve the last couple of screens of kernel
  658.   messages with the dmesg command, if you can't find them anywhere else.
  659.  
  660.  
  661.   If you need to get someone to help you with anything, a copy of this
  662.   log information is critical.  Try to send as many of the relevant log
  663.   messages as you can along with any bug report.
  664.  
  665.   Here is a sample of what the kernel's log messages should look like:
  666.  
  667.  
  668.  
  669.               scsi0 : PPA driver version 0.26 using 8-bit mode on port 0x378.
  670.               scsi : 1 host.
  671.               Vendor: IOMEGA    Model: ZIP 100           Rev: N*32
  672.               Type:   Direct-Access                      ANSI SCSI revision: 02
  673.               Detected scsi disk sda at scsi0, channel 0, id 6, lun 0
  674.               scsi : detected 1 SCSI disk total.
  675.               SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  676.               sda: Write Protect is off
  677.               Partition check: sda: sda1
  678.  
  679.  
  680.  
  681.  
  682.   This output came from a 1.3.87 system with a parallel ZIP drive.  The
  683.   exact output will vary depending on your host adapter and whether you
  684.   have any other SCSI devices in your system.
  685.  
  686.   The first line displays the initialization message from the low-level
  687.   driver for the host adapter, in this case PPA. Following that comes
  688.   the drive identification information returned by each device found on
  689.   the SCSI bus. Line 5 reports the device name assigned to the drive, in
  690.   this case /dev/sda.  And the last line hows the result of the
  691.   partition check of the disk in the drive.  This one has one partition,
  692.   /dev/sda1.  These reports come from different modules in the kernel.
  693.   If you have more than one SCSI adapter, or several disks, each section
  694.   will contain more information.
  695.  
  696.   If you are using a fresh disk, direct from Iomega, the partition check
  697.   should show one partition, /dev/sda4.  If you have other SCSI devices
  698.   you will understand that the ZIP drive could appear on some other
  699.   device name like /dev/sdb - so check these messages.
  700.  
  701.   If these lines do not appear, then something is misconfigured in your
  702.   hardware or in the kernel.  Check everything carefully before sending
  703.   mail.
  704.  
  705.   If the scsi0: line does not appear, then you have not configured your
  706.   host adapter and its driver correctly.  Some drivers will give you a
  707.   hint about what is wrong.   If your drive is not detected, you
  708.   probably have a cable problem.  If a drive name is not assigned, you
  709.   probably forgot to include SCSI disk support when you built the
  710.   kernel.
  711.  
  712.   Check the README files in drivers/scsi and the SCSI HOWTO for other
  713.   debugging hints.
  714.  
  715.  
  716.   5.2.  Fdisk, mke2fs, mount, etc.
  717.  
  718.   Once you know the drive name for your ZIP drive, you are set.  You can
  719.   manipulate the drive with the normal Linux disk management commands.
  720.   fdisk (or perhaps cfdisk) is used to manipulate the partition tables
  721.   on the disk.  mke2fs can be used to format a partition with the ext2
  722.   filesystem - the one most commonly used in Linux.  mount is used to
  723.   connect a formatted partition into your directory hierarchy.
  724.  
  725.   You should study the manual pages for these tools if you are not
  726.   familiar with them.  Be warned that there are now several quite
  727.   different versions of the fdisk program - be careful.
  728.  
  729.   I'll describe two common scenarios.
  730.  
  731.  
  732.   5.3.  An existing DOS formatted disk
  733.  
  734.   If you have a ZIP disk with a DOS file structure that was originally
  735.   created by Iomega's tools, the partition scan should say that the disk
  736.   has one partition, /dev/sda4.
  737.  
  738.   You should make a place to mount the disk, lets say /zip, and then
  739.   mount it as an MS-DOS filesystem:
  740.  
  741.  
  742.  
  743.               mkdir /zip
  744.               mount -t vfat /dev/sda4 /zip
  745.  
  746.  
  747.  
  748.  
  749.   You could also use msdos instead of vfat. vfat supports long filenames
  750.   where msdos does not.  Now, the files on the disk should appear in
  751.   /zip.  While the disk is mounted, you will not be able to remove it.
  752.   When you are finished with the disk you can umount it to release it
  753.   and detach it from your directory hierarchy.
  754.  
  755.  
  756.  
  757.               umount /zip
  758.  
  759.  
  760.  
  761.  
  762.   Once you've made the /zip mount point - you don't need to do it again,
  763.   so you could come back later and mount something else there.
  764.  
  765.  
  766.   5.4.  Re-format as a native Linux disk
  767.  
  768.  
  769.   If you want to erase a ZIP disk and make a Linux native file system on
  770.   it.  You should use fdisk on the entire disk:
  771.  
  772.  
  773.  
  774.               fdisk /dev/sda
  775.  
  776.  
  777.  
  778.  
  779.   and delete any existing partitions (with the d command).  Then create
  780.   a new partition with the n command, make it primary partition number
  781.   1, use w to write the partition table to disk, and quit with q.
  782.  
  783.   Format the partition
  784.  
  785.  
  786.  
  787.               mke2fs /dev/sda1
  788.  
  789.  
  790.  
  791.  
  792.  
  793.   (The 1 is the number that you gave this partition in fdisk).  Now you
  794.   can mount the disk:
  795.  
  796.  
  797.  
  798.               mount -t ext2 /dev/sda1 /zip
  799.  
  800.  
  801.  
  802.  
  803.   (re-using that mount point we created before).
  804.  
  805.  
  806.   5.5.  The ZIP Tools disk
  807.  
  808.  
  809.   There is some extra work to be done if you want to use the disk that
  810.   comes with the ZIP drive.  As shipped, the software controlled write
  811.   protection is enabled.  Most people have unlocked the disk under DOS
  812.   before ever trying to use it with Linux.  Linux cannot access a locked
  813.   disk, and it must be unlocked with Iomega's tools.
  814.  
  815.   A native Linux program to manage the write protection feature, among
  816.   other things, is expected to be available soon.
  817.  
  818.  
  819.  
  820.   6.  Performance
  821.  
  822.   With the standard version of the 2.0.x kernels you get the 0.26
  823.   version of the ppa.c program. This is a very reliable simple program.
  824.   It has gotten a lot of use and abuse and held up rather well. The only
  825.   bad thing about this program is that it's not very fast. On my machine
  826.   I have version 2.0.30 kernel, and 2 parallel ports. This is also a
  827.   low-buck machine pentium 133 - 16 meg memory, 5 gig maxtor eide hard
  828.   drive. The machine cost me 500. U.S. Dollars and the drive was 250. I
  829.   am cheap but so what.
  830.  
  831.   I had the ZIP drive on the second port and the printer on the first
  832.   port. The second port was an old add in card, no epp mode. This made
  833.   the driver run in 4 bit mode.
  834.  
  835.   To base line the performance I copied the netscape tar file from the
  836.   hard drive to the zip drive. This file is about 10.6 meg.  Time 7
  837.   minutes 15 seconds. Going from the zip drive to the hard drive was
  838.   about 7 minutes even. Not exactly setting the world on fire.
  839.  
  840.   I then made 2 changes. First I switched the ZIP drive to the first
  841.   port and went into the bios and set EPP mode on for the first port.
  842.   At the same time I hooked up the printer to the 2nd port.
  843.  
  844.   Second change I went out and downloaded the new version of the program
  845.   from  David Campbells page <http://www.torque.net/~campbell/> Then I
  846.   installed this program. Check out the readme file that is included.
  847.  
  848.   Then I ran the same test again of copying the Netscape tar file to and
  849.   from the ZiP drive. The copy to the C drive was 1:55 seconds. From the
  850.   hard drive to the Zip drive was 1 minute flat. This compares to 7:15
  851.   and 7:00 with the old program. This was a big improvement over the
  852.   0.26 program.  This was also using the zip drive as a vfat file type.
  853.  
  854.   Next I formated a zip drive in ext2 format. Ran the same test again.
  855.   The copy going to the hard drive was only 50 seconds. The copy from
  856.   the hard drive to the Zip drive was only 40 seconds.
  857.  
  858.  
  859.    Performance Summary
  860.  
  861.   For this test case of moving a 10.6 meg file, the 4 bit standard port
  862.   mode and program version 0.26 is the slowest 7:00 and 7:15
  863.  
  864.   The new program (1.41) and EPP mode with ext2 file types is the
  865.   fastest at 50 seconds and 40 seconds.
  866.  
  867.  
  868.  
  869.   7.  Frequently asked questions
  870.  
  871.   These are some of the questions that we get asked a lot.  Please read
  872.   the answers here before asking them again !
  873.  
  874.  
  875.   7.1.  Can I plug a printer into the parallel ZIP drive ?
  876.  
  877.   Yes, but.  Currently, you cannot have both the lp and ppa drivers
  878.   active on the same parallel port.  A resource sharing protocol has
  879.   been designed and is in the early stages of implementation, but will
  880.   not be available before Linux 2.0 is released.
  881.  
  882.   If you like living on the bleeding edge of things, get the 2.1.x
  883.   kernel and you can have port sharing. See
  884.   <http://www.cyberelk.demon.co.uk/parport.html>
  885.  
  886.   The easy way to do this with 2.0.x kernel is to have 2 parallel ports.
  887.   I bought my second one for about 15 dollars and it works great.  You
  888.   can use one for printing and one for your ZIP drive.  Just build a
  889.   kernel with both the lp and ppa drivers as modules. I use the newer
  890.   (1.41) version of ppa, so I just load ppa first (insmod ppa). It then
  891.   finds the zip drive on the first port.  Then I load lp (insmod lp) and
  892.   it assigns the printer to the second port.
  893.  
  894.   If you use the 0.26 version of the program then include the lp and ppa
  895.   as part of the kernel, (not as modules). Then put some appropriate
  896.   configuration commands on your kernel command line.  For instance, if
  897.   you use LILO and you have a printer on 0x378 and a ZIP drive at 0x3bc
  898.   you could add the following line to your /etc/lilo.conf file.
  899.  
  900.  
  901.  
  902.               append = "lp=0x378 ppa=0x3bc"
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.   7.2.  Do you plan to support EPP/ECP ports in PPA ?
  910.  
  911.  
  912.   Version 0.26 of the program does not support EPP. Version 1.41 does
  913.   support the EPP. This program is also much faster. See the performance
  914.   section for more details.
  915.  
  916.  
  917.   7.3.  Can I run Linux from a ZIP drive ?
  918.  
  919.   People have done this. It would seem this might make a great rescue
  920.   disk or a way to test an install.
  921.  
  922.   <http://sunsite.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>
  923.  
  924.  
  925.   7.4.  Can I boot from the ZIP drive ?
  926.  
  927.   This depends on what you are using for a host adapter.  If your host
  928.   adapter has a BIOS ROM with code that can boot from target 5 or 6,
  929.   then yes, you can boot from the SCSI ZIP drive.  You cannot boot from
  930.   a parallel port drive.
  931.  
  932.   If you have DOS on your main disk and want to boot Linux from a ZIP
  933.   disk, you can do this using the LOADLIN boot loader.  Your kernel
  934.   image must be somewhere on the DOS disk, but the rest of your Linux
  935.   system could be on the ZIP.  Make sure that the kernel you use has the
  936.   correct drivers built in.
  937.  
  938.   As far as I am aware, there are no installation boot floppies for any
  939.   of the popular distributions that contain the parallel ZIP driver.
  940.  
  941.  
  942.   7.5.  Why does Iomega use partition number 4 ?
  943.  
  944.   This is one of the most popular questions, but I don't think anyone
  945.   has a definite answer to this one.  Could be they had their head where
  946.   the sun don't shine. Maybe there is no reason.
  947.  
  948.  
  949.   7.6.  How can I have the disk mounted at boot time ?
  950.  
  951.   All you need to do is to add a line to your /etc/fstab file.  For
  952.   instance, if you will always have a DOS disk in the drive when you
  953.   boot, you could put
  954.  
  955.  
  956.  
  957.               /dev/sda4   /zip  vfat  defaults  0 0
  958.  
  959.  
  960.  
  961.  
  962.   in the fstab.  Depending on your distribution, the initialization
  963.   scripts might try to run fsck on partitions listed in your fstab.  Be
  964.   aware that this could cause problems if you forget to put the disk in
  965.   the drive when you boot, or have the wrong disk there.
  966.  
  967.  
  968.   7.7.  What happens if there is no disk inserted when I boot ?
  969.  
  970.   The kernel will try to read the partition table, but the operation
  971.   will time out.  There is nothing to worry about.  Once you have
  972.   inserted a disk, and try to do something with it the kernel will
  973.   notice that there is a disk there now and rescan the partition table.
  974.  
  975.   HINT: when you change disks, it is a good idea always to use fdisk to
  976.   check the partition structure on the new disk.
  977.  
  978.   The BIOS on some SCSI host adapters will attempt to read the partition
  979.   table on your disk during the system boot.  If you cannot disable this
  980.   check, you may be forced always to boot with a disk in the drive.
  981.  
  982.  
  983.   7.8.  Can I use the parallel drive as a real SCSI disk ?
  984.  
  985.   The PPA-3 parallel-to-SCSI adapter is implemented as a single ASIC
  986.   chip that Iomega calls a VPI0.  It is embedded on the ZIP drive's
  987.   controller card.  There is an actual SCSI bus present, but not in a
  988.   useful form.
  989.  
  990.  
  991.   Although I haven't tried to compare the two cards, it seems logical
  992.   that the VPI0 replaces the conventional electrical buffering circuits
  993.   that would be required if the SCSI bus were extended outside the
  994.   package.
  995.  
  996.  
  997.  
  998.   7.9.  Can PPA be used with Iomega's parallel port tape drives ?
  999.  
  1000.   No.  Those drives are floppy-tape drives. There is no SCSI involved.
  1001.  
  1002.   Several people have indicated an interest in applying my methods to
  1003.   try to determine the protocol and develop a driver for these tapes.
  1004.   The first step in that process is to get the DOS driver working under
  1005.   DOSemu.  I have not yet heard that anyone has been successful in doing
  1006.   it.
  1007.  
  1008.  
  1009.   7.10.  Will PPA work with the parallel port SyQuest EZ135 ?
  1010.  
  1011.   No. The EZ135 is an IDE drive with a ShuttlePort parallel to IDE
  1012.   converter embedded in it.
  1013.  
  1014.   However there has been some work done on this driver. Check out
  1015.  
  1016.   <http://www.torque.net/linux-pp.html>
  1017.  
  1018.  
  1019.  
  1020.   8.  Getting more current information
  1021.  
  1022.   More current versions of the parallel port zip drive (ppa.c) program
  1023.   and current technical information of the driver can be found at
  1024.  
  1025.   <http://www.torque.net/~campbell/>
  1026.  
  1027.   Information of many parallel port external device drivers can be found
  1028.   at
  1029.  
  1030.   <http://www.torque.net/linux-pp.html>
  1031.  
  1032.   Parallel Port sharing or through-port information is found at
  1033.  
  1034.   <http://www.cyberelk.demon.co.uk/parport.html>
  1035.  
  1036.   Installing Linux from a zip drive (for machines without a CD)
  1037.  
  1038.   <http://sunsite.unc.edu/mdw/HOWTO/mini/Install-From-ZIP.html>
  1039.  
  1040.   An X frontend to the ziptool program can be found at
  1041.  
  1042.   <http://www.scripps.edu/~jsmith/jazip/>
  1043.  
  1044.   Information on configuration of Lilo can be found at
  1045.  
  1046.   <http://sunsite.unc.edu/mdw/HOWTO/mini/LILO.html>
  1047.  
  1048.   Information on using bootprompts can be found at
  1049.  
  1050.   <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>
  1051.  
  1052.   If you want to install the Linux OS onto a Zip Drive and run the OS
  1053.   from the Zip drive
  1054.  
  1055.   <http://sunsite.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>
  1056.  
  1057.   Iomega's web pages are at
  1058.  
  1059.   <http://www.iomega.com/>.
  1060.  
  1061.   And if you are looking for general information about parallel port
  1062.   programming for the PC, you might want to visit
  1063.  
  1064.   <http://www.lvr.com/parport.htm>
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.