Generally speaking:
Bios->mbr->grub (LILO)-> kernel-> user space
1. When the system is on, the CPU assigns the PC pointer to a specific address 0xffff0 and executes the instructions at that address. In the PC, the address is in the BIOS.
2. The BIOS searches for active, bootable devices in accordance with the sequence of boot settings in the CMOS. If it is a hard disk, read the MBR (512) byte into RAM and give control to the program.
3. The main boot loader finds and loads the secondary boot loader. It looks for the active partition in the partitioned table and scans the other partitions when an active partition is found to ensure that they are not active. When the process is complete, read the boot record of the active partition into RAM and execute it.
4. The secondary boot loader loads the Linux kernel and optional initial ramdisk and gives control to the Linux kernel.
5. Run the loaded kernel and start the user space application.
The process for kernel boot to user space is as follows:
Start ():/arch/i386/boot/head. S Basic hardware settings
Startup_32 ():/arch/i386/boot/compress/head. S initializes the page table and starts the inner paging mechanism.
Decompress_kernel ():/ARCH/I386/BOOT/COMPRESS/MISC.C
Startup_32 ();
Start_kernel ():/INIT/MAIN.C initialization interrupt, further setting of memory
Cpu_idle (): /init/main.c