During Booting BIOS contain address of boot loader and boot loader load kernel .Why 2 step process . why can BIOS directly load kernel ?
There may be multiple OS present on disk. 2 Step process help us in loading one of the OS from multiple OS, which is not possible if BIOS directly start the kernel.
@badalgupta9911103602 I think the multiple OS part is the grub, not BIOS
exactly correct .
u can explain it like after the BIOS completing the tests it lookup the boot-loader's INIT file .
when the boot loader is located means it will load the different operating systems boot file.
after selecting the boot file ,operating system like Windows or Linux or some other systems .
"Finally the kernel will be loaded based on the operating system which you have been selected. "
I think you can understand this thing .!!!!!!
Nothing to do with multiple OS.
BIOS is in the ROM. It is made to look for the MBR, where 1st stage of bootloder is present.
- Stage 1 boot loader is read into memory from the MBR.
- The Stage 1.5 boot loader is read into memory by the Stage 1 boot loader. The Stage 1.5 boot loader is found either on the /boot/ partition or on a small part of the MBR and the /boot/ partition.
- The Stage 2 or secondary boot loader is read into memory. This is where you see grub menu.
- Stage 2 loads the kernel and intram onto the memory.
BIOS is so small, it cannot store and load kernel image.
Also, BIOS does its job by showing us the MBR of each disk. MBR has bootloader which can be modified. BIOS code cannot be modified.
This is the design aspect to achieve abstraction.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.