Review: Linux Kernel in a Nutshell

Kernel hacker Greg Kroah-Hartman decided to do something about it; the result is Linux Kernel in a Nutshell, published by O'Reilly. By the standards of other kernel books from that publisher, this is a thin volume indeed: just over 180 pages, including the index. But it is packed with information that should be useful to just about anybody who has to deal with the kernels on their systems.
The early chapters cover some of the basics: what tools are required, where to get the kernel source, etc. There is a chapter on the various ways of configuring a kernel. Your editor remembers the days of configuring kernels by stepping through the entire "make config" process; it's nice to see Greg recommending against that approach now. The build process is discussed, as are the necessary steps for installing the kernel once it's built.
The second major part of the book discusses customizations - in particular, enabling support for a device. The process for determining which driver should be enabled for a specific device is distressingly hairy; it involves listing out the PCI bus configuration, digging through sysfs, then trying to find a match in the kernel source. It's not for nothing that Greg says:
As they say, there really should be a better way. But one can't fault Greg for telling it like it is.
Next there is a set of "kernel configuration recipes" for enabling specific behavior. The advice here is terse, sometimes to a fault. The discussion on enabling kernel preemption, for example, could have benefited from a mention of the reliability concerns which have kept most distributors from turning preemption on. Similarly, it talks about how to enable SELinux with no mention of the need for an accompanying policy loaded from user space. The audience for this book seems likely to include quite a few people from the "know just enough to hurt themselves" population; a few more hints might have proved most helpful to those readers.
The final section, making up almost half of the book, is devoted to reference material. There is an extensive list of kernel command line parameters and what they do - though the treatment is, once again, terse. There is a useful chapter on the various make targets and options for the kernel; somehow your editor had managed to avoid learning about make randconfig until now. There is also a reference chapter for configuration options. This chapter is incomplete, however, and the options do not appear to be listed in any particular order.
Minor grumbles aside, there is value in this book's conciseness. When
faced with a question about kernel configuring, building, or booting, this
book is likely to yield an answer without forcing the reader to search for
a needle in an 800-page haystack. It covers an area which was very much in
need of some improved documentation; it is also reasonably up to date,
having been written for the 2.6.18 kernel. Happily, Greg has
made the book available online.
Overall, Linux Kernel in a Nutshell is a more than welcome addition
to your editor's bookshelf.
Index entries for this article | |
---|---|
Kernel | Books |
Posted Feb 8, 2007 17:51 UTC (Thu)
by kingdon (guest, #4526)
[Link]
I assume the point is to find cases where the kernel won't compile with some sets of configuration answers. If so, it's cute. I can imagine a server sitting there downloading git trees and running this, and reporting whatever failures it finds.
Posted Feb 9, 2007 14:33 UTC (Fri)
by Randakar (guest, #27808)
[Link]
"The discussion on enabling kernel preemption, for example, could have benefited from a mention of the reliability concerns which have kept most distributors from turning preemption on."
What are these reliability concerns, exactly?
I've seen Ben Collins (of Ubuntu) for instance making seperate 'lowlatency' kernels with preempt available mentioning that he only makes them available by popular demand, but without any guarantees on their reliability. I always assumed that this was based on some inane assumptions about preempt that are ultimately incorrect, but from this remark it seems he's not the only one - he might actually have a case.
What is going on with preempt?
The book doesn't seem to elaborate on "make randconfig" other than saying what it does: pick random answers to the various configuration choices.make randconfig
What is going on with preempt?