User:Chathuna ayeshmantha/sandbox

Linux boot process
In reality, there are two sequences of events that are required to boot a Linux computer and make it usable boot and start-up. The boot sequence starts when the computer is turn on, and is completed when the kernel is initialized and system is launched. The start-up process then takes over and fin finishing the task of getting the Linux computer into an operational state.

Overall, the Linux boot and start-up process are fairly simple to understand. It is comprised of the following steps which will be described in more details in the following sections.


 * BIOS POST
 * BOOT LOADER
 * KERNEL INITIALITION
 * START SYSTEM THR PARENT OF ALL PROCESSES

BIOS POST
The first step of the Linux boot process really has nothing whatever to do with Linux. This is the hardware portion of the boot process and is the same for any operating system. When power is first applied to the computer it runs the POST (Power on Self-Test) which is part of the BIOS (Basic I/O System).

BIOS POST checks the basic operability of the hardware and then it issues a BIOS interrupt, INT 13H, which locates the boot sectors on any attached bootable devices. The first boot sector it finds that contains a valid boot record is loaded into RAM and control is then transferred to the code that was loaded from the boot sector.

BOOT LOADER (grub2)
GRUB2 stands for "Grand Unified Bootloader, version 2" and it is now the primary bootloader for most current Linux distributions. GRUB2 is the program which makes the computer just smart enough to find the operating system kernel and load it into memory. Because it is easier to write and say GRUB than GRUB2, I may use the term GRUB in this document but I will be referring to GRUB2 unless specified otherwise.

GRUB has been designed to be compatible with the multiboot specification which allows GRUB to boot many versions of Linux and other free operating systems; it can also chain load the boot record of proprietary operating systems.

KERNEL INITIALITION
All of the kernels are in a self-extracting, compressed format to save space. The kernels are located in the /boot directory, along with an initial RAM disk image, and device maps of the hard drives.

After the selected kernel is loaded into memory and begins executing, it must first extract itself from the compressed version of the file before it can perform any useful work. Once the kernel has extracted itself, it loads system, which is the replacement for the old SysV init program, and turns control over to it.

This is the end of the boot process. At this point, the Linux kernel and system are running but unable to perform any productive tasks for the end user because nothing else is running.

START SYSTEM THR PARENT OF ALL PROCESSES
System is the mother of all processes and it is responsible for brining the Linux host up to a state in which productive work can be done. Some of its functions, which are far more extensive than the old unit program, are to manage many aspects of a running Linux host, including mounting filesystems, and starting and managing system services required to have a productive Linux host. Any of systems tasks that are not related to the start-up sequence are out side the scope of this article.