Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

Re: Documentation

Curt Sampson (cjs@portal.ca)
Sun, 8 Feb 1998 19:34:37 -0800 (PST)

On Sat, 7 Feb 1998, James Amendolagine wrote:

> I'm doing a research assignment for an OS class, and am thinking of
> examining the boot/init process for linux. I can't seem to find any
> gentle guides though, and thought that there would be some.
> Are there any guides for this kind of thing?

Unfortunately, there's not a lot of Linux coverage in the texts
available out there. The only book I'm aware of that's devoted
specifically to Linux is _Linux Kernel Internals_ by Beck et al.
(Addison-Wesley, 1996--but note that it's a translation of a German
book from '94), which covers only 1.x, and is not very good at
giving a broad overview of things, concentrating more on explaining
specific bits of code, though not in all that much detail. There
is another more general OS textbook published recently that uses
Linux as a case study and seemed to take a lot of examples from
Linux, but I can't recall the title. (I didn't buy it because it
didn't seem to cover any topic that wasn't alreay covered in at
least two of the dozen or so books in this subject area I already
own.)

Appendix D of _Linux Kernel Internals_ is devoted to LILO, but
covers the options more than the code. Section 3.2.3 (p. 41) is
the only section that deals with booting the system and it's only
a page long, and doesn't cover initialisation, device probing and
configuration at all. The only information on autoconfiguration in
the book is little snippets from the device driver point of view
in the device drivers section.

The best introduction to what goes on in a modern Unix system at
startup that I've seen is Chapter 14 of _The Design and Implementation
of the 4.4BSD Operating System_, by McKusick, et al. (Addison
Wesley, 1996). You really should read this even if you're doing
your project on a different OS. It is one of the very few books
out there that covers device autoconfiguration.

The only other discussion of device autoconfiguration I've seen is
in _Operating System Source Code Secrets Volume 1: The Basic Kernel_,
by William and Lynne Jolitz (Peer to Peer, 1996). It goes into a
fair amount interesting theoretical detail about device autoconfiguration
and how they think it should work, and is worth reading for that,
but unfortunately they never actually manage to reduce this to
practice, which lets them gloss over some very serious problems in
their system. I personally don't think that what they describe can
be implemented.

For a good overview and some details of system startup on an i386
system, you might try Tanenbaum and Woodhull's _Operating Systems:
Design and Implementation_, 2nd ed. (Prentice Hall, 1997), which
uses Minix as the example OS. Sections 2.6.5 and 2.6.6 (starting
on p. 120) cover bootstrapping and system initialisation, though
they don't cover device configuration. There are some general notes
on device configuration in section 3.7.3, starting around page 209,
but Minix device configuration is quite primitive; there's no real
autoconfiguration; the system devices are configured with environment
variables on boot.

Douglas Comer's _Operating System Design: The Xinu Approach_
(Prentice Hall, 1984) devotes chapter 13 (p. 189) to system
initialisation and chapter 20 (p. 367) to configuration, but like
Minix, it uses an uninteresting static configuration system for
all but a very few devices.

Chapter 6 of _Lions' Commentary on Unix 6th Edition_ (Peer to Peer
communications, 1996), with the accompanying source code goes into
startup of a (relative to modern standards) fairly simple system
in all the gory detail; this book is well worth reading. Again,
though, this system is statically configured.

Now that I've given you this outline, I would like again (as I
usually do) to emphasise that if you really want to understand any
type of program, you have to learn to read code and do it on a
regular basis. The Lyons book above is a really good way to start
in on this.

cjs

Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite mist, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.