Previous Next Contents

4. Getting and installing ftape

4.1 Getting ftape

The v2.0.X versions of the kernel have version 2.08 of ftape already.

Version 2.09 of ftape is available from sunsite. I don't know if it works with v1.2.13 of the kernel. If you are running on a kernel >= v2.0.16 (maybe v2.0.14) you also need to get ftape-2.09-2.09c.dif.gz.

For earlier versions of the kernel, you can get ftape from many ftp sites in the world. The two main sites are:

sunsite is the official place to look for ftape.

Dr. Owen LeBlanc has been kind enough to provide access to Manchester's public ftp server, so that the ftape code can be dropped directly into the ftape directory.

The ftp area on www.pip.dknet.dk has gone away as of June 1st, 1996. New versions will not be uploaded to to pip.

An installation guide will eventually included in this section. For the moment being, you'll have to do with the document that is included in the ftape distribution.

4.2 What you need to install ftape

There are three source distributions that you must have to get ftape running:

If you have a v1.2 kernel, you should use the modules-1.3.57 package, not the modules-1.2.8 package (Bjørn Ekwall, maintainer of the modules package, encourages this). I don't know if modules-2.0.0 will work on a v1.2 kernel (anyone that knows, please tell me).

If you are using v1.3.x of the kernel, you should consider moving to v2.0.x. v1.3.x was the development release prior to the production release v2.0.x.

The modules utilities

The modules packages can be found on tsx-11.mit.edu and sunsite.unc.edu. You must compile and install it before you compile the kernel.

What's new in modules-1.3.57?

As of kernel version 1.3.57, ``kernel daemon'' (kerneld) support is included in the standard kernel. kerneld can automatically insert and remove the necessary modules to your kernel, at runtime. To be able to utilize this, you must have the modules-1.3.57 package, which contains the kerneld daemon.

WARNING! If you use ftape's non-rewinding devices (/dev/nrft[0-3]) you should never ever use kerneld to automatically insert/remove ftape. Failing to observe this may cause you to loose the data on the tape.

Installing the modules utilities

Extract the files somewhere convenient. Then, go into the modules-1.3.57 (or -1.3.69) directory and say make all; make install. Remember that you must be root to be able to install the files and man pages.

If you wish to enable certain users (e.g. yourself, as non-root) to insert/remove modules without having to log in as root, you can create a new group (eg: trust), change the group of insmod to trust and the permissions to 4710 (i.e: suid root, the group have execute rights, but `other' have no rights). This is, of course, a security issue, since any user who is member of the trust group will be able to insert anything into the kernel and by careful coding give herself root rights (you have been warned). However, if you do trust the people in the trust group, this is a convenience. This is a way to give yourself module access without going to root in order to do it.

The Linux kernel

Since Linux version 1.2 has been out for some time this HOWTO assumes that everyone has switched over to it (or v2.0.x for that matter). If you have not already switched over, this HOWTO assumes you have a very good reason for not doing so, and that you can cope with the differences in installation etc, that it will make for you. If you wish to know what version the latest kernel is, simply try finger @linux.cs.helsinki.fi. Expect these instructions to lean more towards v2.0.x as time goes on.

The kernel can be fetched from a large number of sites all over the world, including these:

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

You will find a number of subdirectories, including two named v1.2 and v2.0. These contain (you guessed it!) v1.2 and v2.0 of the kernel.

The v2.0 is the latest production release. When v2.1 is started, it will be the latest development kernel branch.

Early versions of v2.0 had some problems with interplay between the ftape and the floppy drivers, but these problems seem to be getting shaken out as of v2.0.18. Version v1.2 is mentioned because there are still folks out there running it.

The Linux kernelQuick guide to compiling the kernel

The `standard' (recommended) place to install the kernel source is /usr/src/linux.

Go to /usr/src and type tar xzf linux-1.2.13.tar.gz (or whatever kernel version you intend to compile). This will create the linux directory (and a lot of subdirectories), which holds the kernel source code.

        # cd /usr/src
        # tar xzf linux-1.2.13.tar.gz

Go into the linux directory and configure the kernel.

        # cd linux
        # make config

The configuration script will ask you about which drivers you wish to include, and what functionality (networking, file-systems, etc) that you want. If you use a kernel version earlier than v1.3.34, there will be NO ftape option. This is because ftape has been taught to allocate its DMA buffers at insmod time. Hence, the need for `kernel support' vanished. If you have a pre-2.04 ftape distribution, you can get a patch from ftp.mcc.ac.uk which will implement the dynamic buffers.

Note that you can safely insert a ftape module into a kernel which is configured for `ftape support'. The only drawback is that you will lose around 112Kbytes of precious DMA'able memory.

If you use a v1.2 kernel, you must make a short detour around the kernel directory, to apply a patch to the kernel/ksyms.c file at this point. The patch can be found as ftape-2.08/linux-1.2/ksyms.patch. Change to the directory and apply the patch.

        # cd kernel
        # patch < ../../ftape-2.08/linux-1.2/ksyms.patch
        # cd ..

(this assumes that you have the ftape source lying in /usr/src/ftape-2.08).

After you have configured the kernel, you must generate the dependency files and then compile the kernel.

        # make dep
        # make zImage

If everything goes well, you should find the compiled kernel in arch/i386/boot/zImage. If you have selected any drivers to be compiled as modules, you must also do a `make modules'.

Now, you can compile ftape for you new kernel (there is no need to reboot your first).

        # cd /usr/src/ftape-2.08

There are a few options that you can tinker with in the Makefile. Most importantly, if you still use gcc v2.4.5 you must add `-DGCC_2_4_5_BUG' to the `FTAPE_OPT' variable. Also, if you have one of Colorado's FC-10 or FC-20 controllers you must tell ftape this.

4.3 What you need to install ftapeFollowing the development of the ftape driver

If you want to follow the development of the ftape driver, you should read the Usenet newsgroup linux.dev.tape. This is really gatewayed from the mailing list linux-tape@vger.rutgers.edu, but since vger is brought to it's knees due to the load of the various Linux mailing lists, I recommend everyone to read the newsgroup instead.

If you are unable to read news, you can subscribe to the TAPE mailing list by sending a mail saying `subscribe linux-tape' (in the body) to majordomo@vger.rutgers.edu. When you subscribe, you will be sent a greeting mail, which will tell you how to submit real mails and how to get off the list again.

Please note that I do not, repeat DO NOT, have any special powers with regard this mailing list. If you're stuck on the list, don't bother to tell me that. I can only shrug and send you my sympathy (but that won't get you off the list).

4.4 Can I format my tapes under Linux?

No! Ian Burrell has offered to work on this and has teamed up with Steven Sorbom to work on this. This is probably not just ``around the corner'', so please be patient.

Until formatting becomes available under Linux, 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.5 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 ( <kjj@primenet.com>), so I can update the list.

4.6 Mixing ftape and floppies

Since both the floppy driver and ftape needs 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.


Previous Next Contents