modules would be loaded; the kernel could be kept smaller, and adding
hardware was much simpler.
The typical Ubuntu kernel has some drivers compiled as part of the kernel
itself (called inline drivers) and others compiled as modules. Only device
drivers compiled inline are available to the kernel during the boot process;
modular drivers are available only after the system has been booted.
NOTE
As a common example, drivers for SCSI disk drives must be available to
the kernel if you intend to boot from SCSI disks. If the kernel is not
compiled with those drivers inline, the system does not boot because it
cannot access the disks.
A way around this problem for modular kernels is to use an initial RAM
disk (initrd), discussed later in this chapter, in the “Creating an Initial
RAM Disk Image” section. initrd loads a small kernel and the
appropriate device driver, which then can access the device to load the
kernel you want to run.
Some code can be only one or the other (for technical reasons unimportant to
the average user), but most code can be compiled either as modular or inline.
Depending on the application, some system administrators prefer one way
over the other, but with fast modern processors and abundant system memory,
the performance differences are of little concern to all but the most ardent
Linux hackers.
When compiling a kernel, making the selection of modular or inline is part of
the make config step, detailed later in this chapter. Unless you have a
specific reason to do otherwise, select the modular option when given a
choice. Because you will be managing kernels more frequently than
compiling kernels, the process of managing modules is addressed in the next
section.
Managing Modules
When using a modular kernel, special tools are required to manage the
modules. Modules must be loaded and unloaded, and it would be nice if that
were done as automatically as possible. You also need to be able to pass
necessary parameters to modules when you load them—things such as
memory addresses and interrupts. (That information varies from module to
module, so you need to look at the documentation for your modules to
determine what, if any, information needs to be passed to them.) This section