Friday, January 15, 2010

WAKING UP LINUX : An introduction to the LINUX boot sequence .

The article is intended at understanding one of the basic concepts of LINUX, it's boot sequence .

A very important note is that the boot sequence is system architecture dependent .

To simplify things let us get an overview in terms of a simple diagram :

Reference :

Let us handle the issue in terms of the various stages mentioned in the figure above :

Step1 ) Loading up the BIOS :

This is an OS independent process (Quite inferable) .

1) Even though we hardly deal with switches and cables to boot a system these days , the process is still the same and to make a computer enthusiast's job simple , the boot process is identical on all processor architectures .

2) The BIOS is first program plugged in from a fixed location of the firmware ( the motherboard ) .This fixed location could be a flash memory / the ROM itself.
The BIOS , these days have so many options to allow us to boot into the system . We could set the boot from the DVD/USB and various  other options seen at the system startup .

A sample can be seen as depicted in the figure below :

The BIOS , later boots the stage 1 boot loader whose basic function , is to locate a more advanced boot loader also called as the Stage 2 boot loader .

So let's skip the functions of the 1st stage boot loader and move on to the next one i.e the Stage 2 boot loader .

Step 2) Functions of the Stage 2 boot loader :
As a first step for all who wish to know more about LINUX kernel images visit ,
LINUX Kernel Image , to get  a very brief  and a handy introduction .

The Stage 2 boot loader loads both the LINUX kernel image and the initial file system . At this point , the Stage 2 boot loader verifies the device attached to the system and interfaces them for the OS to get ready to use them.

At this stage , the kernel is decompressed and the root file system is mounted . Along with this the Stage 2 boot loader initialises the basic kernel modules into functioning before it hands control to the Kernel .

Stage 3) The LINUX kernel:

The Linux kernel , initialises the first user process i.e init and then the high-level initialiasation is performed to complete the process of booting .

1 comment:

jay said...

hey prashanth
can u help ppl on how to install linux and how to resolve the problems when installing it ???

thanks in advance