Linux Boot Process

Some curious folk asked me how Linux system boots, what is process behind it. I thought to share with all, so here I will tell you how Linux boot process works.

We Linux users spend a lot of time on our computers,but we never think,how our Linux system boots? What is the process behind the startup of our Linux operating system. To better understand the boot process we should have good knowledge about the Grub, MBR, BIOS,Boot Loader and initrd etc….which we will discuss here later.

When you switch on your Linux pc, BIOS [Basic Input Output System] which is a small raw chip installed on your systems motherboard] starts up significantly. BIOS checks all hardware peripheral devices[cd-dvd, hard disk etc..] connected to your system. When your system boots from your hard disk, BIOS load & executes the boot loader code of the first sector of your hard disk which is also known as MBR into the memory. MBR stands for master boot record. MBR is consist of 512 bytes. 446 bytes are retain for boot loader,which contain executable code and error messages , next 64 bytes will be retain for partition table and next 2 bytes are retain for magic number.Magic number works as a acceptance check for the MBR.

MBR/Primary Boot loader finds the grub/secondary boot loader and starts it. Grub is the boot loader for the Linux operating system. Now the grub/secondary boot loader will load the kernel and initrd into the memory. Once the Kernel and initrd images are loaded into the memory, the grub hands over the control of the boot process to the Kernel. Now kernel will initialize and configure the computers memory . It will now configure various hardware connected to the system, load the initrd [it is used to load the drivers that are necessary to boot the system] and will read the program and services one by one and will leave you on the user log on prompt.

You can leave a response, or trackback from your own site.

Leave a Reply