The Boot Process

BIOS

The BIOS, or Basic Input Output Subroutines, is responsible for a good deal of the hardware-level configuration of periferal devices as well as the CPU and RAM. It usually performs things like RAM tests and sets up the video card for standard vga communications so that it can print things to the screen. This is a very basic setup process and is usually little more than making sure that everything is powered, working, and able to communicate through some default minimal interfaces so that more funcionality can be achieved.

Once the BIOS is done, it will look for a bootloader. There are some systems, such as some versions of Alphas, that have the boot loader in BIOS. However, on intel systems, generally the bootloader is stored in the first few thousand bytes of the hard drive, called the Master Boot Record, or MBR.

The boot loader

The boot loader is the very small program whose responsibility it is to start up an operating system. The normal boot loader for Linux is called LILO (LInux LOader). It is capable of booting up many different operating systems. In general, it achieves this by copying out the important part of that operating system's kernel to memory and then transfers execution on the CPU to the beginning of the place where that kernel is in memory.

The Kernel

The kernel is the first piece of software to start execution on your computer. The first thing that your kernel will do is get the memory set up in your computer. This means setting up the tables of what is allocated to what process, things like that.

The kernel will also begin initializing devices, starting with important stuff like buses and then moving out to other devices like hard drives and so forth

Once it's done with hardware, the kernel will start taking care of things like filesystems on hard drives, and other sorts of middle-level parts of the computer.

Init

Once the kernel is done setting up the hardware and other such important parts of the computer, it will start setting up user-level software. The first program run in every UNIX operating system is a program called init. Init is often called the father of all processes. If you look, you will notice that init always has process ID number 1. This is why.

What init does is dependent on the particular UNIX system that it comes with, but in general init starts running scripts that get the machine configured to what particular machine it is. This involves setting up the networking (such as configuring the machine with its IP address) and host names and things like that.

Next it will usually run scripts which start important services, such as web servers, font servers, and other daemons.

Login

Once init completes its initialization of the computer, it generally will, as its last startup action, start some sort of login program. This is usually either a getty for a terminal login or some variation of xdm (gdm, kdm, etc.) which is a graphical login program. At this point it will also start accepting network connections if it is capable of them.

At this point your computer is finished booting up.