of our lives. In this chapter, we chose to use the version numbers for a
recent LTS release of Ubuntu. The version numbers on your system may be
different, but the processes and concepts remain the same.
The /usr/src/linux-4.15.3 directory contains the .config files
and the makefiles, among others. The .config file is the configuration of
your Linux kernel as it was compiled. There is no .config file by default;
you must select one from the /configs subdirectory. There, you will find
configuration files for each flavor of the kernel Ubuntu provides; simply copy
the one appropriate for your system to the default directory and rename it
.config.
We have already discussed the contents of the /configs subdirectory, so
let’s examine the other directories found under /usr/src/linux-
4.15.3. The most useful one for us is the Documentation directory. In it
and its subdirectories, you will find almost all the documentation concerning
every part of the kernel. The file 00-INDEX (which each Documentation
subdirectory contains) contains a list of the files in the main directory and a
brief explanation of what they are. Many files are written solely for kernel
programmers and application writers, but a few are useful to intermediate or
advanced Linux users when attempting to learn about kernel and device driver
issues. Some of the more interesting and useful documents are as follows:
devices.txt—This file contains a list of all possible Linux devices
that are represented in the /dev directory, giving major and minor
numbers and short descriptions. You may at some point have gotten an
error message that mentions char-major-xxx; this file is where that
list is kept.
ide.txt—If your system uses IDE hard drives, this file discusses how
the kernel interacts with them and lists the various kernel commands that
you can use to solve IDE-related hardware problems, manually set data
transfer modes, and otherwise manually manage your IDE drives. Most
of this management is automatic, but if you want to understand how the
kernel interacts with IDE devices, this file explains it.
initrd.txt—This file provides much more in-depth knowledge of
initial RAM disks, giving details on the loopback file system used to
create and mount them and explaining how the kernel interacts with
them.
kernel-parameters.txt—This file is a list of most of the
arguments that you can pass at boot time to configure kernel or hardware
settings, but it does not appear too useful at first glance because it is just