Basically it goes like this.
The motherboard BIOS loads and runs the boot loader from the MBR of the specifiied boot device.
The bootloader loads and runs the kernel.
The kernel starts the init process.
The init process mounts the root file system read only and reads the /etc/inittab file.
At this point different distributions do different things.
The init process may execute the rc.local script or it might execute the /etc/init.d/boot script or some other script.
This script will eventually call all of the other boot scripts one way or another. One of these scripts will fsck the root partition and then mount it read/write.
Then the init process goes back to the /etc/inittab file to see what should be done last such as spawining sulogin or login on all of the virtual console terminals. The part of the inittab file that says things like 2:2345:respawn:/sbin/mingetty tty2 will be read by the init process and the init process will make sure that the respawn is done whenever it is required, such as when someone logs in and then logs off of a console terminal.
And that's it.
It's basically like a badly written application with subroutines that call other subroutines but eventually all of the subroutines exit and you get back to the main() function, which is where the init process remains running for the duration of the operating system incarnation. This style of programming is called spaghetti code.
Last edited by stress_junkie; 10-04-2006 at 09:59 PM.