UNIX / Linux Tutorial

2.9.3 Installing A Device Driver Module  |  2.9.4 Upgrading The Libraries  |  2.9.5 Upgrading gcc

2.9.6 Upgrading Other Software  |  2.10 Miscellaneous Tasks

2.9.3 Installing A Device Driver Module

Linux provides support for a variety of tape drives with IDE, SCSI, and some proprietary 
interfaces. Another common type of tape drive connects directly to the floppy drive 
controller. Linux provides the ftape device driver as a module.

At the time of this writing, the most recent version of ftape is 3.04d. You can retrieve
the package from the sunsite.unc.edu FTP archive.

The ftape archive is located in /pub/Linux/kernel/tapes. Be sure to get the most
recent version. At the time of this writing, this is ftape-3.04d.tar.gz.

After unpacking the ftape archive in the /usr/src directory, typing make install in the 
top-level ftape directory will compile the ftape driver modules and utilities, if 
necessary and install them. If you experience compatibility problems with the ftape
executable distribution files and your system kernel or libraries, executing the commands.
make clean and make install will ensure that the modules are compiled on your
system.

To use this version of the ftape driver, you must have module support compiled into 
the kernel, as well as support for the kerneld kernel daemon. However, you must not
include the kernel's built-in ftape code as a kernel option, as the more recent ftape 
module completely replaces this code.

make install also installs the device driver modules in the correct directories. On
standard Linux systems, modules are located in the directory:

            /lib/modules/kernel-version

If your kernel version is 2.0.30, the modules on your system are located in
/lib/modules/2.0.30.The make install step also insures that these modules
are locatable by adding the appropriate statements to the modules.dep file, located in
the top-level directory of the module files, in this case /lib/modules/2.0.30.The
ftape installation adds the following modules to your system (using kernel version 2.0.30
in this example):

           /lib/modules/2.0.30/misc/ftape.o
       	   /lib/modules/2.0.30/misc/zft-compressor.o
    	   /lib/modules/2.0.30/misc/zftape.o

The instructions to load the modules also need to be added to the system-wide
module configuration file. This is the file /etc/conf.modules on many systems.
To automatically load the ftape modules on demand, add the following lines to the
/etc/conf.modules file:

                 alias char-major-27 zftape
                 pre-install ftape /sbin/swapout 5

The first statement loads all of the ftape related modules if necessary when a device with the
major number 27 (the ftape device) is accessed by the kernel. Because support for the zftape
module (which provides automatic data compression for tape devices) requires the support
of the other ftape modules, all of them are loaded on demand by the kernel. The second line
specifies load-time parameters for the modules. In this case, the utility /sbin/swapout,
which is provided with the ftape package, ensures that sufficient DMA memory is available
for the ftape driver to function.

To access the ftape device, you must first place a formatted tape in the drive.

2.9.4 Upgrading The Libraries

As mentioned before, most of the software on the system is compiled to use shared
libraries, which contain common subroutines shared among different programs.

If you see the message:

                 Incompatible library version

when attempting to run a program, then you need to upgrade to the version of the libraries
which the program requires. Libraries are backwardly compatible. A program compiled
to use an older version of the libraries should work with the new version of the libraries
installed. However, the reverse is not true.

The newest version of the libraries can be found on Linux FTP sites. On
sunsite.unc.edu, they are located in /pub/linux/gcc. The "release" files there
should explain what files you need to download and how to install them. Briefly, you
should get the files image-version.tar.gz and inc-version.tar.gz where version
is the version of the libraries to install, such as 4.4.1. These are tar files compressed 
with gzip. The image file contains the library images to install in /lib and /usr/lib.
The inc file contains include files to install in /usr/include.

The release-version.tar.gz  should explain the installation procedure in detail
(the exact instructions vary with each release). In general, you need to install the library's
.a and .sa files in /usr/lib. These are the libraries used at compilation time.

In addition, the shared library image files, libc.so.version  are installed in /lib.
These are the shared library images loaded at run time by programs using the libraries.
Each library has a symbolic link using the major version number of the library in /lib.

The libc library version 4.4.1 has a major version number of 4. The file containing
the library is libc.so.4.4.1. A symbolic link of the name libc.so.4 is also placed
in /lib pointing to the library. You must change this symbolic link when upgrading the
libraries. For example, when upgrading from libc.so.4.4 to libc.so.4.4.1, you
need to change the symbolic link to point to the new version.

You must change the symbolic link in one step, as described below. If you delete 
the symbolic link libc.so.4, then programs which depend on the link (including basic
utilities like ls and cat) will stop working. Use the following command to update the
symbolic link libc.so.4 to point to the file libc.so.4.4.1:

                   # ln -sf /lib/libc.so.4.4.1 /lib/libc.so.4

You also need to change the symbolic link libm.so.version in the same manner. If you
are upgrading to a different version of the libraries, substitute the appropriate file names,
above. The library release notes should explain the details. 

2.9.5 Upgrading gcc

The  gcc  C and C++ compiler is used to compile software on your system, most importantly
the kernel. The newest version of  gcc  is found on the Linux FTP sites. On
sunsite.unc.edu, it is found in the directory /pub/Linux/GCC (along with the libraries).
There should be a  release  file for the  gcc  distribution detailing what files you
need to download and how to install them. Most distributions have upgrade versions that
work with their package management software. In general, these packages are much easier
to install than "generic" distributions.

2.9.6 Upgrading Other Software

Upgrading other software is often simply a matter of downloading the appropriate files
and installing them. Most software for Linux is distributed as compressed tar files that
include sources, binaries, or both. If binaries are not included in the release, you may need
to compile them yourself. This means at least typing make in the directory where the
sources are located.

Reading the Usenet newsgroup comp.os.linux.announce for announcements of
new software releases is the easiest way to find out about new software. Whenever you are
looking for software on an FTP site, downloading the  ls-lR   index file from the FTP site
and using grep to find the files you want is the easiest way to locate software. If you have
archie available to you, it can be of assistance as well. There are also other Internet
resources which are devoted specifically to Linux. See Appendix A for more details.

2.10 Miscellaneous Tasks

Believe it or not, there are a number of housekeeping tasks for the system administrator
which don't fall into any major category.

Note:
If you don't have archie, you can telnet to an archie server such as archie.rutgers.edu, 
login as "archie" and use the command "help".

HOME

1.1 Introduction   1.2.10 Referring To Home Directories   1.3.4  Copying Files

1.6 Exploring The File System   1.8   Wildcards   1.9.3 Pipes   1.10.3 Permissions Dependencies

1.12.4  Stopping And Restarting Jobs   1.13.3 Inserting Text   1.13.9 Including Other Files

1.14.3 Shell Initialization Scripts   System Administration   2.3.1 The /etc/imitate file

2.4 Managing File Systems   2.6 Managing Users  2.6.5 Groups   2.7.2 gzip and compress

2.8.3 Making Backups To Tape Devices   2.9.1 Upgrading The Kernel  

BOOK: LINUX QUICK COMMAND REFERENCE

http://personal.atl.bellsouth.net/~psadler

© copyright KnowledgeWorks, Inc. (2001)