Editing the Linux Kernel Configuration Files
kerneld and other programs can do a lot more for you when they are configured by hand. Granted, this is not as nice as a graphical configuration program, but Linuxs roots (in fact, UNIXs roots) are in text mode, and these systems for the most part have been run by hackers (the good ones, that is) who do not care too much for glitzy configuration tools when vi will do.
That being said, later revisions of the 2.0 Linux kernel sport both text-based menus and point-and-click X compile-time configuration tools in addition to the obtuse step-by-step configuration method. Recompiles are now rarely required for systems running production kernels. Only kernel updates themselves require compilation of the kernel for your system. If youre really allergic to compiling and installing kernels, a number of packages can be found that can install a later kernel for you.
The main file for kernel module configuration is /etc/conf.modules. In fact, this is the same file that is edited with the kernelcfg tool. The kernel daemon supports a great deal more than the kernelcfg tool, and manually editing the file allows for a great deal more flexibility. kerneld and the supporting programs know about most modules that ship with the stock Linux kernel, and attempt to take care of these automatically. The only ones that kerneld needs help with are network, SCSI, and CD-ROM devices. The reason for this is pretty simpleautodetection of hardware is not something that should have to happen on a running system if it can be avoided, because the PC platform is just far too complex for things to be 100% reliable in this regard.
Other modules take other parameters
Other modules, such as networking, ask for IRQ and IO address information.
kerneld comes preconfigured for the majority of modules that now come with Linux. To find out about which modules kerneld is currently aware of, run the following command:
/sbin/modprobe -c | grep -v '^path | less
This command gives you a listing of what the /etc/conf.modules file would look like if kerneld knew nothing about the modules on your system. Fortunately this is not the case, but it is handy to be able to see how kerneld actually sees the world. Kerneld keeps some configuration information elsewhere on your system to allow it to know about the modules it listed for you, and to provide the basic functionality to keep your system running. The modprobe command is a tool that can be used to manually manage modules, and is documented in detail later in this chapter. As far as the preceding command goes, the call to grep just filters out all the extraneous information such as the actual paths of the module files, which are irrelevant to the current discussion.
Configuring Your Sound Card
As mentioned before, the Red Hat Linux kernel is almost entirely modular. Chances are that there is a module already compiled for your sound card, and that all you need to do is add the appropriate line to your modules configuration file to point the system to the right file. While its possible to load and unload sound modules on-the-fly, its not recommended because sound card drivers need to allocate contiguous areas of memory for buffering. At boot-up, this is easy, but it becomes increasingly difficult the longer the system has been running.
With the advent of Plug and Play PC hardware (most affectionately known by most PC support techs as Plug and Pray), things can get complicated with configuring sound cards at times, and the only advice I can give is be patient. Eventually it will work if the hardware is directly supported. Asking questions on Usenet newsgroups can be especially enlightening if youre absolutely stuck. In some cases, its best to recompile the kernel, and make the sound drivers you need into one module, rather than a whole mess of them. You see, in my opinion the good folks at Red Hat set up their sound system to be a bit too modular, and the result is that its easy to make a mistake when there are multiple modules being loaded with multiple parameters each, and which have to load in a certain order. I am trying to spare you the hours of fighting with the sound system and detail a way as to how to get only the drivers you need and the base sound functionality into one module instead of three or four. I detail this later in the section Using make config.