Before reading this section, you should know that nothing in it is needed to actually use Linux. It is only here for your own enjoyment and interest, but if you find it boring or overly technical, skip over it!
After the BIOS passes control to LILO , LILO passes control to Linux. (This is assuming you have configured to boot by default. It is also possible for LILO to call DOS or some other PC operating system.) The first thing that does once it starts executing is to change to protected mode.protected mode The 80386 CPU that controls your computer has two modes (for our purposes) called real modereal mode and protected mode. DOS runs in real mode, as does the BIOS. However, for more advanced operating systems, it is necessary to run in protected mode. Therefore, when Linux boots, it discardes the BIOS.
Linux then looks at the type of hardware it's running on. It wants to know what type of hard disks you have, whether or not you have a bus mouse, whether or not you're on a network, and other bits of trivia like that. Linux can't remember things between boots, so it has to ask these questions each time it starts up. Luckily, it isn't asking you these questions--it is asking the hardware! During boot-up, the kernel will print variations on several messages. You can read about the messages in Section 3.3.
The kernel merely manages other programs, so once it is satisfied everything is okay, it must start another program to do anything useful. The program the kernel starts is called init . (Notice the difference in font. Things in that font are usually the names of programs, files, directories, or other computer related items.) After the kernel starts init , it never starts another program. The kernel becomes a manager and a provider, not an active program.
So to see what the computer is doing after the kernel boots up, we'll have to examine init . init goes through a complicated startup sequence that isn't the same for all computers. For there are many versions of init , and each does things its own way. It also matters whether your computer is on a network, or what distribution you used to install . Some things that might happen once init is started:
After init is finished with its duties at boot-up, it goes on to its regularly scheduled activities. init can be called the parent of all processes process on a Unix system. A process is simple a running program; since any one program can be running more than once, there can be two or more processes for any particular program. (Processes can also be sub-programs, but that isn't important right now.) There are as many processes operating as there are programs.
In Unix, a process , an instance of a program, is created by a system call, a service provided by the kernel, called fork . init forks a couple of processes, which in turn fork some of their own. On your system, what init runs are several instances of a program called getty. getty will be covered in...