Originally Published: Thursday, 19 July 2001 Author: Subhasish Ghosh
Published to: learn_articles_firststep/General Page: 1/6 - [Printable]

Bootstrapping a Linux system - An Analysis

Ever wonder what happens between powering on your system and the logon prompt? You see all the screen messages, but what do they mean? Linux.com writer Subhasish Ghosh wondered the same thing, and went to find out in Bootstrapping a Linux System.

Introduction   Page 1 of 6  >>

Everyday millions of Linux users all over the world switch on their computers, wait for a few seconds (or minutes depending on their CPU speeds) to see their favorite operating system boot, and finally get the "login" prompt. It causes immense pleasure just to log into your favorite operating system and work, doesn't it? Well, for me, surely it does.

As many of the readers must have noticed when the computer is bootstrapping itself a lot of messages come up on the screen. These can be viewed later by issuing the command: cat /var/log/dmesg | more (because it is usually a lot of output). Now, the question is: Hey, what do these messages mean? That's easy to answer: Look into any Linux textbook, and you will find it says something like this: "the Kernel Boot messages" and so on. But, is that all? And what is meant by "Kernel Boot messages"?

A complete understanding of the internal workings of Linux requires a lot of patience and even sacrifice because it requires a complete understanding of the architecture of the Linux Kernel. Most Linux users either don't have that much study time available or are not that interested in it, while some may have other important things to do in life. But for those of you who, like me, are interested in what happens at boot time this article will attempt to cast a little more light on the issue.

I am not going to explain the "Linux Kernel Architecture" in this article because it would require a whole book to do so. Rather, in this article, I explain (or at least try to explain), in detail, one of the most fundamental concepts of a computer-system - Bootstrapping; the process of starting the system, from turning on the system to seeing the login prompt

Bootstrapping. What's that?

Traditionally, the term "to bootstrap" refers to a person who tries to stand up (usually while lying down) by pulling on his or her own boots. In operating systems the term refers to the process in which a part of the operating system is brought into the Main Memory, with the processor executing those instructions. At bootstrapping the internal data structures of the Linux Kernel are initialized, values are set to the constituent variable(s), and processes are created (that usually spawn other significant processes later). Computer bootstrapping is a long and complicated task because when the computer is switched on all the hardware devices are in an unpredictable state, while the RAM is inactive and in a random state. Thus, the thing to keep in mind is the process called "bootstrapping" is highly dependent on the computer architecture in question.

Please note:
  1. A very basic understanding of the internal workings and operations of a computer kernel is assumed on behalf of the readers.
  2. All the files mentioned in this article refer to Linux Kernel 2.4.2-2. Though the files are common for all Linux Kernels and can be found on any Linux system, I have used Red Hat Linux 7.1
  3. In this article we must limit our discussion to IBM PC architectures.
  4. I have a friend who lives nearby who kicks his CPU to start what he calls "bootstrapping". I usually call it "bootslapping". But the process mentioned here also applies to his machine!




Introduction   Page 1 of 6  >>