-->

Previous | Table of Contents | Next

Page 109

cbs=bytes Convert bytes bytes at a time.
skip=blocks Skip blocks ibs-sized blocks at start of input.
seek=blocks Skip blocks obs-sized blocks at start of output.
count=blocks Copy only blocks ibs-sized input blocks.
conv=conversion[,conversion...] Convert the file as specified by the conversion arguments.

Conversions:

ascii Convert EBCDIC to ASCII.
ebcdic Convert ASCII to EBCDIC.
ibm Convert ASCII to alternate EBCDIC.
block Pad newline-terminated records to size of cbs, replacing newline with trailing spaces.
unblock Replace trailing spaces in cbs-sized block with newline.
lcase Change uppercase characters to lowercase.
ucase Change lowercase characters to uppercase.
swab Swap every pair of input bytes. Unlike the UNIX dd, this works when an odd number of bytes are read. If the input file contains an odd number of bytes, the last byte is simply copied (since there is nothing to swap it with).
noerror Continue after read errors.
notrunc Do not truncate the output file.
sync Pad every input block to size of ibs with trailing NULLs.

GNU File Utilities

depmod, modprobe

depmod, modprobe—Handle loadable modules automatically

SYNOPSIS


depmod [_a]

depmod module1.o module2.o ...



modprobe module.o [symbol=value ...]

modprobe _t tag pattern

modprobe _a _t tag pattern modprobe _l [ _t tag ] pattern

modprobe _r module

modprobe _c

DESCRIPTION

These utilities are intended to make a Linux modular kernel manageable for all users, administrators, and distribution maintainers.

depmod creates a makefile-like dependency file, based on the symbols it finds in the set of modules mentioned on the command line (or in a default place). This dependency file can later be used by modprobe to automatically load the relevant module(s).

modprobe is used to load a set of modules—either a single module, a stack of dependent modules, or all modules that are marked with a specified tag.

modprobe will automatically load all base modules needed in a module stack, as described by the dependency file modules.dep. If the loading of one of these modules fails, the whole current stack of modules will be unloaded (by rmmod) automatically.

modprobe has two ways of loading modules. One way (the probe mode) will try to load a module out of a list (defined by pattern). It stops loading as soon as one module load successfully. This can be used to autoload one Ethernet driver out of a list, for example. The other way is to load all modules from a list. This can be used to load some modules at boot time.

Page 110

With the option -r, modprobe will automatically unload a stack of modules, similar to the way rmmod -r does.

Option -l combined with option -t lists all available modules of a certain type. An enhanced mount command could use the command:


modprobe -l -t fs

to get the list of all file system drivers available and on request load the proper one. So, the mount command could become more generic as well. (The kerneld solves this without changing the mount utility.)

Option -c will print all configuration (default + configuration file).

The normal use of depmod is to include the line /sbin/depmod -a in one of the rc-files in /etc/rc.d, so that the correct module dependencies will be available immediately after booting the system.

Option -d puts depmod in debug mode. It outputs all commands it is issuing.

Option -e outputs the list of unresolved symbol for each module, Normally, depmod only outputs the list of unloadable modules.

Option -v outputs the list of all processed modules.

Modules may be located at different place in the filesystem, but there will always be some need to override this, especially for module developers. We expect some official standard will emerge, defined by the FSSTND. Until that time, you might as well use this suggested directory structure.

CONFIGURATION

The behavior of depmod and modprobe can be adjusted by the (optional) configuration file /etc/conf.modules.

The configuration file consists of a set of lines. All empty lines, and all text on a line after a #, will be ignored. Lines may be continued by ending the line with a \. The remaining lines should all conform to one of the following formats:


keep

parameter=value

options module symbol=value ...

alias module real_name

pre-install module command ...

install module command ...

post-install module command ...

pre-remove module command ...

remove module command ...

post-remove module command ...

parameter=value options module symbol=value ... alias module real_name

All values in the parameter lines will be processed by a shell, which means that shell tricks like wildcards and commands enclosed in backquotes can be used:


path[misc]=/lib/modules/1.1.5?/misc

path[net]=/lib/modules/'uname -r'/net

Parameters may be repeated multiple times.

These are the legal parameters:

depfile=DEPFILE_PATH This is the path to the dependency file that will be created by depmod and used by modprobe.
path=SOME_PATH The path parameter specifies a directory to search for the modules.
path[tag]=SOME_PATH The path parameter can carry an optional tag. This tells us a little more about the purpose of the modules in this directory and allows some automated operations by modprobe. The tag is appended to the path keyword enclosed in square brackets. If the tag is missing, the tag misc is assumed. One very useful tag is boot, which can be used to mark all modules that should be loaded at boot time.

If the configuration file /etc/conf.modules is missing, or if any parameter is not overridden, the following defaults are assumed:

Previous | Table of Contents | Next