Section 2.2. Tools to Use the Kernel


2.2. Tools to Use the Kernel

While the version of the kernel that is running does not usually affect any user application, there are a small number of program for which the kernel version is important. This section describes a number of tools that are probably already installed on your Linux system. If you upgrade your kernel to a version different from the one that came with your distribution, some of these packages may also need to be upgraded in order for the system to work properly.

2.2.1. util-linux

The util-linux package is a collection of small utilities that do a wide range of different tasks. Most of these utilities handle the mounting and creation of disk partitions and manipulation of the hardware clock in the system.

If you wish to download and install the util-linux package yourself, you can find it at http://www.kernel.org/pub/linux/utils/util-linux.

As of the 2.6.18 kernel release, the 2.10 release of util-linux is the oldest that works properly. It is recommended that you install the latest version of this package, because new version support new features added to the kernel. Bind mounts are one example of an option in newer kernels, and a newer version of util-linux is needed in order to have them work properly.

To determine which version of the util-linux package you have on your system, run the following command:

 $ fdformat --version 

2.2.2. module-init-tools

The module-init-tools package is needed if you wish to use Linux kernel modules. A kernel module is a loadable chunk of code that can be added to or removed from the kernel while the kernel is running. It is useful to compile device drivers as modules and then load only the ones that correspond to the hardware present in the system. All Linux distributions use modules in order to load only the needed drivers and options for the system based on the hardware present, instead of being forced to build all possible drivers and options in the kernel in one large chunk. Modules save memory by loading just the code that is needed to control the machine properly.

The kernel module loading process underwent a radical change in the 2.6 kernel release. The linker for the module (the code that resolves all symbols and figures out how to put the pieces together in memory) is now built into the kernel, which makes the userspace tools quite small. Older distributions have a package called modutils that does not work properly with the 2.6 kernel. The module-init-tools package is what you need to get the 2.6 kernel to work properly with modules.

If you wish to download and install the module-init-tools package yourself, you can find it at http://www.kernel.org/pub/linux/utils/kernel/module-init-tools.

As of the 2.6.18 kernel release, the 0.9.10 release of module-init-tools is the oldest version that works properly. It is recommended that the latest version of this package be installed, as new features added to the kernel can be used by newer versions of this package. Blacklisting modules to prevent them from being automatically loaded by the udev package is one such option that is present in newer versions of module-init-tools, but not older ones.

To determine which version of the module-init-tools package you have on your system, run the following command:

 $ depmod -V 

2.2.3. Filesystem-Specific Tools

A wide range of tools specific to particular filesystems are necessary to create, format, configure, and fix disk partitions. The util-linux package has a few of these utilities, but some of the more popular filesystems have separate packages that contain the necessary programs.

2.2.3.1. ext2/ext3/ext4

The ext3 and experimental ext4 filesystems are upgrades of ext2 and can be managed with the same tools; any recent version of an ext2-based tool can work with the other two filesystems as well.

To work with any of these filesystems, you must have the e2fsprogs package. If you wish to download and install this package yourself, you can find it at http://e2fsprogs.sourceforge.net.

As of the 2.6.18 kernel release, the 1.29 release of e2fsprogs is the oldest that works properly with the kernel. It is highly recommended that you use the newest version in order to take advantage of newer features in the ext3 and ext4 filesystems.

To determine which version of e2fsprogs you have on your system, run the following command:

 $ tune2fs 

2.2.3.2. JFS

To use the JFS filesystem from IBM, you must have the jfsutils pacakge. If you wish to download and install this package yourself, you can find it at http://jfs.sourceforge.net.

As of the 2.6.18 kernel release, the 1.1.3 release of jfsutils is the oldest that works properly with the kernel. To determine which version of jfsutils you have on your system, run the following command:

 $ fsck.jfs -V 

2.2.3.3. ReiserFS

To use the ReiserFS filesystem, you must have the reiserfsprogs package. If you wish to download and install this package yourself, you can find it at http://www.namesys.com/download.html.

As of the 2.6.18 kernel release, the 3.6.3 release of reiserfsprogs is the oldest that works properly with the kernel. To determine which version of reiserfsprogs you have on your system, run the following command:

 $ reiserfsck -V 

2.2.3.4. XFS

To use the XFS filesystem from SGI, you must have the xfsprogs package. If you wish to download and install this package yourself, you can find it at http://oss.sgi.com/projects/xfs.

As of the 2.6.18 kernel release, the 2.6.0 release of xfsprogs is the oldest that works properly with the kernel. To determine which version of xfsprogs you have on your system, run the following command:

 $ xfs_db -V 

2.2.3.5. Quotas

To use the quota functionality of the kernel, you must have the quota-tools package.[*] This package includes programs that let you set quotas on users, provide statistics on the amount of quota being used by different users, and issue warnings when people get too close to using up their available filesystem quota.

[*] Some distributions, notably Debian, call this package quota instead of quota-tools.

If you wish to download and install this package yourself, you can find it at http://sourceforge.net/projects/linuxquota.

As of the 2.6.18 kernel release, the 3.09 release of quota-tools is the oldest that works properly with the kernel. To determine which version of quota-tools you have on your system, run the following command:

 $ quota -V 

2.2.3.6. NFS

To use the NFS filesystem properly, you must have the nfs-utils package.[] This package includes programs that let you mount NFS partitions as a client, and run an NFS server.

] Some distributions, notably Debian, call this package nfs-utils.

If you wish to download and install this package yourself, you can find it at http://nfs.sf.net.

As of the 2.6.18 kernel release, the 1.0.5 release of nfs-utils is the oldest that works properly with the kernel To determine which version of nfs-utils you have on your system, run the following command:

 $ showmount --version 

2.2.4. Other Tools

There are a few other important programs that are closely tied to the kernel version. These programs are not usually required in order for the kernel to work properly, but they enable access to different types of hardware and functions.

2.2.4.1. udev

udev is a program that enables Linux to provide a persistent device-naming system in the /dev directory. It also provides a dynamic /dev, much like the one provided by the older (and now removed) devfs filesystem. Almost all Linux distributions use udev to manage the /dev directory, so it is required in order to properly boot the machine.

Unfortunately, udev relies on the structure of /sys, which has been known to change from time to time with kernel releases. Some of these changes in the past have been known to break udev, so that your machine will not boot properly. If you have the latest version of udev recommended for your kernel and have problems with it working properly, please contact the udev developers on the mailing list available at linux-hotplug-devel@lists.sourceforge.net.

It is highly recommended that you use the version of udev that comes with your Linux distribution, as it is tied into the distribution specific boot process very tightly. But if you wish to upgrade udev on your own, you can find it at http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html.

As of the 2.6.18 kernel release, the 081 release of udev is the oldest that works properly with the kernel. It is recommended that you use the latest version of udev, because it will work better with newer kernels, due to changes in how udev and the kernel communicate.

To determine which version of udev you have on your system, run the following command:

 $ udevinfo -V 

2.2.4.2. Process tools

The package procps includes the commonly used tools ps and top, as well as many other handy tools for managing and monitoring processes running on the system.

If you wish to download and install this package yourself, you can find it at http://procps.sourceforge.net.

As of the 2.6.18 kernel release, the 3.2.0 release of procps is the oldest that works properly with the kernel. To determine which version of procps you have on your system, run the following command:

 $ ps --version 

2.2.4.3. PCMCIA tools

In order to properly use PCMCIA devices with Linux, a userspace helper program must be used to set up the devices. For older kernel versions, this program was called pcmcia-cs, but that has been replaced with a much simpler system called pcmciautils. If you wish to use PCMCIA devices, you must have this package installed for them to work properly.

If you wish to download and install this package yourself, you can find it at ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia.

As of the 2.6.18 kernel release, the 004 release of pcmciautils is the oldest that works properly with the kernel. But the latest version is recommended in order to take advantage of newer features in the PCMCIA subsystem, such as automatic driver loading when new devices are found.

To determine which version of pcmciautils you have on your system, run the following command:

 $ pccardctl -V 



Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net