569 573




Using Linux:Managing the Kernel






-->















Previous
Table of Contents
Next




CHAPTER 32Managing the Kernel

By Jan Walter

Using the Red Hat kernelcfg tool
Editing the Linux kernel configuration files
Managing modules
Managing processes
Recompiling the kernel

The kernel is the core component of every operating system. The performance of the kernel determines the most fundamental properties of the operating system, as it is an application’s gateway to the computer hardware. Modern kernels provide preemptive multitasking capability, which allows multiple programs to operate seemingly at the same time. This is physically impossible with only one system processor, but the kernel schedules the processes in such a way that they seem to be running concurrently.
While the Linux kernel is a complicated piece of software, it is one of the most simple 32-bit kernel designs in common use. Linux has always been on the leading edge of feature support, as well as performance—a truly rare combination. The simplicity of the kernel also increases the system’s reliability, which is another of Linux’s hallmarks.
The Linux kernel requires very little maintenance after it is set up to run correctly. It’s the process of getting it that way, however, that many newcomers to Linux have complained about.
Red Hat Linux is almost completely configurable at run-time, with few reboots required. This means that networking, sound cards, file systems, and even device support can be dynamically reconfigured, added, and removed from the system as necessary to facilitate almost any configuration.
Using the Red Hat kernelcfg Tool

kernelcfg is the graphical management utility included with Red Hat Linux that manages kerneld. kerneld manages the automatic loading and unloading of kernel device driver modules—for instance, the Zip drive driver is loaded into memory only when a program needs to use the Zip drive.
In particular, kerneld is very useful for dealing with filesystem drivers, since these are loaded and unloaded often in general use. kerneld knows about file system modules, and is usually smart enough to figure out if it needs to load one to access a file system. It gets this information from /etc/fstab, the file system configuration file.
As of this writing, the kernelcfg program has a number of problems, especially with regard to saving the configuration file. The following sections document how kernecfg is supposed to work. Keep an eye on the Red Hat Linux Web site for updates to kernecfg.
Adding a Module to the Kernel Configuration
Only SCSI host and ethernet device modules need to be added to the kernel configuration. Most of these devices benefit from command-line arguments, and using kernelcfg is a good way to keep things consistent and reduce the amount of searching the driver has to do to find your particular hardware.


Booting from a SCSI device
If your system is booting from a SCSI device, the Linux kernel must load the SCSI device driver module before kerneld is even running. This is achieved by using an initial ramdisk, from which the driver is loaded. By convention, this SCSI adapter is still configured for kerneld, but in reality it has no effect because the driver is vital to system operation.


1.  Log on as root and start X Window.
2.  From the Control Panel, select Kernel Daemon Configuration. You might have to start the Control Panel application yourself before doing this. Open an X Terminal window and enter control-panel & to open the Control Panel, shown in Figure 32.1.

Figure 32.1  Clicking the topmost icon in the Control Panel starts the kernel Daemon Configuration applet.

3.  Click the topmost icon in the Control Panel to open the Kernel Configurator applet, shown in Figure 32.2. Click the Add button.

Figure 32.2  This is how the Kernel Configurator applet looks on the author’s system.
4.  From the dialog box shown in Figure 32.3, choose the module type that you want to add (click the Module Types button to get a list of them). The most common additions are ethernet devices (eth) and SCSI host adapters (scsi_hostadapter). Occasionally, a proprietary-interface CD-ROM must be configured (cdrom). The remainder of the additions deal with Token-Ring networks, parallel-port networking, and other more advanced configuration topics.

Figure 32.3  Click the module type you want to add to your system’s configuration.
For this example, configure kerneld to automatically load and unload the device driver for our parallel port Zip drive. Choose scsi_hostadapter, and then click OK.
5.  The Kernel Configurator now requires the exact module name. In this example, it is ppa. Click the Which Module? button in the Define Module dialog box (shown in Figure 32.4) to find the module you want. Click OK to proceed.

Figure 32.4  In this case, the ppa module was selected.

6.  Now comes the module-specific part. Most modules accept a number of arguments, like device addresses and interrupt numbers. These depend on the device, and most device drivers are able to autodetect the device parameters. Autodetection of device parameters is not fool-proof, however, and can cause your machine to hang, crash, or do other undesirable things. Fortunately, the Kernel Configurator seems to know about the parameters a particular module can take. Click Done when you’re satisfied that everything is set up correctly.
Figure 32.5 shows the options available for the ppa parallel port Zip drive.

Figure 32.5  Entering the module options for the ppa module.

7.  To get kerneld to recognize the changes to the configuration, click the Restart kerneld button.



Finding information on module parameters
Module documentation has always been something of a weak point in Linux. The most up-to-date information is always included in the kernel, but some repositories on the Internet are also starting to keep this information. (A good place to start looking is the Linux Documentation Project, at http://sunsite.unc.edu/LDP/.) The problem with the information included with the kernel source itself is that it is scattered in all the directories in various Readme files, and for some modules the only way to find out what the parameters are called is to read the source code for the module.





Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
571 573
573 578
01 (573)
569,21,artykul
Dz U 2011 99 573
INSTRUKCJA OBSŁUGI ZMYWARKA INDESIT DSG 573 PL
569 571
00 04 08 praid!569
573 575
573 (2)

więcej podobnych podstron