simple examples of how to

Thursday, October 20, 2011

[Linux Kernel] What is the main function in Linux kernel ?

In x86 architecture, Linux booting starts with reading MBR (master boot record) into main memory.
The instructions in MBR look up an active partition table and executes a boot loader such as GRUB, LILO, etc.
After users select one of OS, the boot loader loads the selected OS and calls start_kernel() function in "init/main.c" in the Linux kernel source tree.
The terms after the OS name in GRUB (such as ro root=/dev/hda1) are passed to start_kernel() function similar to argc and argv[] in c programs.
That is argv_init variable.

No comments:

Post a Comment