4 Getting and installing ftape

Contents of this section

I will eventually include an installation guide in this section. You'll have to do without it, for the moment being.

4.1 What is ftape

ftape is a driver program that controls various low-cost tape drives that connect to the floppy controller.

ftape is not a backup program as such; it is a device driver, which allows you to use the tape drive (just like the SoundBlaster 16 driver let you use your sound card) through the device file /dev/[n]rft[0-3].

ftape is written by Bas Laarhoven <bas@vimec.nl>, with ``a little help from his friends'' to sort out the ECC (Error Correcting Code) stuff. ftape is copyrighted by Bas under the GNU General Public License, which basically says: ``go ahead and share this with the world, just don't disallow other people from copying it further''.

ftape is currently beta testing, and has been that for some time now. It is reliable enough for critical backups (but always remember to check your backups, so you won't get a nasty surprise someday).

ftape supports drives that conform to the QIC-117 and one of the QIC-80, QIC-40, QIC-3010, and QIC-3020 standards. ftape does not support QIC-02 tape drives or drives that connect via a SCSI interface, e.g. a DAT drive. SCSI drives are accessed as /dev/[n]st[0-7] and are supported by the kernel through the SCSI drivers. If you look for help on SCSI tape drives, you should read the SCSI-howto. See section Supported drives and Un-supported drives for a list of supported and unsupported drives.

4.2 How fast is ftape?

You can achieve quite respectable backup and restore speeds with ftape: I have a Colorado DJ-20 and an Adaptec 1542CF controller, and have measured a 4.25Mbyte/min sustained data transfer rate (no compression) across a 70Mbyte tar archive, while comparing the archive on the tape with data on my IDE disk. The speed of ftape is mostly dependent on the data transfer rate of your FDC: The AHA1542CF has a ``post-1991 82077'' FDC, and it will push 1Mbit/sec at the tape drive. If you have an FDC which can only deliver 500Kbit/sec data rates, you will see half the transfer rate (well, roughly).

4.3 The newest version of ftape - and where to get it

The newest version of the ftape driver is ftape-2.02, which consists of ftape-2.02.tar.gz and ftape-lsm. ftape can be fetched from the following site (and its mirrors):

    sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/tapes/

You should get the files: ftape-2.02.tar.gz, and ftape-lsm. The .tar.gz file is the ftape driver proper, while the lsm file is a Linux Software Map (LSM) file for the LSM project.

Newer kernels (from 1.1.85 and on), have improved support for loadable modules (by Bjørn Ekwall and Jacques Gelinas), which (if possible) allows you to insert modules compiled for an `old' kernel into a `new' kernel. To compile the kernel with this improved module support, you need the modules-1.1.87.tar.gz file. It can be found on tsx-11.mit.edu and sunsite.unc.edu:. You must compile and install it before you compile the kernel.

WARNING: ftape-1.14 does not work. You must upgrade to at least ftape-1.14a.

Note that the version number of ftape jumped from 1.14d directly to 2.00.

Patches to ftape-2.02

Around 1.1.85 of the Linux kernel, <linux/sched.h> stopped including the <linux/mm.h> file, which ftape needs. Therefore, you must add it to ftape.h by hand.

--- ftape.h.orig  Mon Jan 23 22:44:22 1995
+++ ftape.h       Mon Jan 23 22:05:48 1995
@@ -31,6 +31,7 @@
  */
 
 #include <linux/sched.h>
+#include <linux/mm.h>
 
 #include "tracing.h"

You may also need to apply the following patch:

--- fdc-io.c.orig  Sat Jan 21 18:37:21 1995
+++ fdc-io.c       Sat Jan 21 18:37:21 1995
@@ -1015,7 +1015,7 @@

 #ifndef FLOPPY_HACK

-static void ftape_interrupt( int unused)
+static void ftape_interrupt( int unused1, struct pt_regs * unused2)
 {
   TRACE_FUN( 8, "ftape_interrupt");
   void (*handler)(void) = *fdc.hook;

Problems with kernel version 1.1.5x

During patchlevel 50 to 60, the floppy driver got changed a few times. A some point, the floppy driver forgot to release the interrupt line (IRQ6). This would result in that you could not use ftape and a floppy drive at the same time. It also resulted in the if you tried to make a ``rescue disk'' (a very sensible thing), where you would boot from floppy and then restore from your backup tape, you experience that when you used ftape, it would say `unable to grab IRQ6 for ftape driver'. No fun. The solution is to upgrade the kernel (v1.1.59 will work).

4.4 If you have ftape-1.14a, or earlier

There have been fixed some serious bugs in the driver and you should really consider to upgrade to at least 1.14d.

4.5 If you have ftape-1.14a, or earlier Following the development of theftape driver

If you want to follow the development of the ftape driver, you should consider subscribing to the TAPE channel on Linux-activists. To subscribe, you send a mail to <linux-activists-request@niksula.hut.fi>, with the first line (or as a part of the header) saying `X-Mn-Admin: join TAPE'. If you send an empty mail you are sent a HOWTO mail.

To submit a real mail to the mailing lists, send a mail to <linux-activists@niksula.hut.fi>, and remember that the first line (or a header line) should read `X-Mn-Key: TAPE'.

To get off the TAPE channel (:-(), send a mail to <linux-activists-request@niksula.hut.fi> with the line `X-Mn-Admin: leave TAPE'

There is also a TAPE mailing list on vger.rutgers.edu. To subscribe to it, send a mail saying `subscribe linux-tape' to majordomo@vger.rutgers.edu. When you subscribe, you will be sent a greeting mail, which will tell you how to submit real mails and how to get off the list again.

4.6 Compiling and installing the ftape driver

There is installation guide (the file Install-guide) included in the ftape distribution; please read that.

4.7 Where to get the kernel sources

You can get the kernel sources from the same place as you got the ftape sources. The sources are kept at the following sites (and many mirror-sites)

    tsx-11.mit.edu   [18.172.1.2]: /pub/linux/sources/system/
    sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/
    ftp.funet.fi  [128.214.248.6]: /pub/OS/Linux/PEOPLE/Linus

You will find a number of subdirectories, including two named v1.1 and v1.2. These contain (you guessed it!) v1.1 and v1.2 of the kernel. I suggest that you get version 1.2.0.

4.8 Can I format my tapes under Linux?

No! Honestly, no one is working on it: If you want to work on it, drop Bas a line. Until then, you'll have to use MessyDOS (arghhh!) instead or buy preformatted tapes. However, some of the preformatted tapes are not checked for bad sectors!. If the ftape driver encounters a tape with no bad blocks, it will issue a warning. If ftape barfs at your preformatted tapes, try out your DOS software. If both the DOS software and ftape barfs on your tapes, a reformat will very probably cure the problem.

Note that to be able to use your newly formatted tapes under ftape, you must erase the tape first:

        mt -f /dev/nftape erase

4.9 Which formatting programs can I use under DOS?

These are known to work:

These programs are known to be more or less buggy:

In fact, most software under DOS should work. The Conner Backup Basics v1.0 has a parameter off by one (someone could not read the QIC-80 specs right!), which is corrected in version 1.1. However, ftape detects this, and will work around it. Dennis T. Flaherty (<dennisf@denix.elk.miles.com>) report that Conner C250MQ owners can obtain the new v1.1, by calling Conner at 1-800-4Conner (in the US) and ask for an upgrade (for a nominal fee for the floppy). The Windows versions should work fine. Some versions of Colorado's tape program for windows, has an off-by-one error in the number of segments. ftape also detect and work around that bug.

Central Point Backup can be used, but it wastes precious tape space when it encounters a bad spot on the tape.

NOTE: If you are running a formatting software under DOS, which is not mentioned here, please mail the relevant info to me (<khp@pip.dknet.dk>), so I can update the HOWTO.

4.10 Mixing ftape and floppies

Since both the floppy driver and ftape need the FDC (and IRQ6), they cannot run concurrently. Thus, if you have mounted a floppy and then try to access the tape drive, ftape will complain that it cannot grab IRQ6 and then die. This is especially a problem when designing a emergency disk for use with ftape. This solution is to either load the boot/root disk into a ramdisk and then unmount the floppy, or have two FDC's.

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter