Can somebody tell me or point me a link which exactly tells what are the programs or process that gets execututed when a linux start. ie starting from the grub (linux bootloader)
You can choose your favorite flavor.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
In Ubuntu 10 and RHEL6(beta for now), the classic init has been replaced with "Upstart" which uses an /etc/init directory instead of /etc/inittab. /etc/init has a bunch of individual files with configuration of what they do and what conditions cause them to run. One of those is equivalent to /etc/rc.d/rc.sysinit, most of the rest are equivalent to the /etc/init.d scripts.
The boot process, following kernel startup is actually fairly simple. The kernel starts
init, which parses
/etc/inittab and starts everything else via scripts. These scripts start up the various daemon programs that might be running in the background during normal system operation.
init also spawns any
getty processes, which service user logons on the console (typically) and sometimes other interfaces (serial, most often).
Different distributions of Linux use different methods for identifying the scripts and their order to be executed (somestiems differentiating for a given runlevel if it's a SysV style init). The Wikipedia page for init can give you more detail, but basically it breaks down into style choices for the method of storing / referencing the scripts that init will call. The kernel itself is agnostic to the type of init conventions used-- it just starts init as the first user-level process.
In a SysV-style init system, a runlevel (basically, a method to allow the system to be booted in a variety of potential startup configurations. You can analogize to Windows "Hardware Profiles", "Safe Mode", etc, if you're familiar with Windows.) determines what scripts are executed. In a BSD-style init system, a series of
rc scripts determine what starts on each boot.
Some distributions start
init out of an initial RAM disk. The initrd is a filesystem used during boot to load kernel modules and bootstrap the system to the point where the "real" root filesystem can be mounted and accessed.
On most Linuxes the first process that gets started is
/sbin/init which then uses the file
/etc/inittab (man) to start other processes.
If you are using an Ubuntu dirivetive you may be using upstart the first binary is also called
/sbin/init but files in
/etc/init/ are used to configure the startup behavior.