Monday, August 22, 2016

Linux and Flavors Boot process on X86 machines


Let us de chipper each stage for a better understanding. Intel has designed its chips to be back portable for the 80286 processor so when, ever the hardware reset or the power button is pressed the processor would kick up in the Real Mode and where the device can address a primary memory, RAM (Random Access Memory) of less than 1MB. Having said this, now BIOS would need to identify the capacity of the CPU and decide on setting the Real Mode of the operation once the initial kernel initialization is done.

BIOS Stage 

  • Stage One: BIOS initialization starts off when the system power button is pressed or the machine is reset. At this point of the time CPU is in real mode and would need to be reset to the real mode when the BIOS initialization starts and reads the MBR  to load the Boot Loader (here we refer to GRUB).


BootLoader Stage

  • Stage Two:  MBR would have the GRUB Position would be identified for the Processor to load the GRUB program.
  • Stage Three: This is the stage when the boot-loader would start executing and setting up the hardware for the kernel to load, Boot loader would know the path to the kernel and would load the kernel and call the Start() method of the linux kernel. 

Kernel Stage
This is stage where the CPU mode is shifted from Real Mode to Protected mode to take the benifit of the memory protection provided by the CPU which in turn allow the Linux kernel to provide multi-processing capacity to the users. Kernel loads the initrd or initramfs Which is a temporary file system and then kernel starts of the Init process which is the First User Mode , Process.




No comments: