LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Init process (https://www.linuxquestions.org/questions/linux-newbie-8/init-process-4175651305/)

krishnar 04-01-2019 05:47 PM

Init process
 
Hi,

Can anyone please guide me how the init process work? I inderstand that first it will read /etc/inittab to find the system run level. What will happen next?

Code:

[krishnar@ip-172-26-5-82]/etc% ll | grep  'init\|rc'
-rw-r--r--  1 root root    2681 Sep 10  2014 bashrc
-rw-r--r--  1 root root    1602 Sep 10  2014 csh.cshrc
drwxr-xr-x  2 root root    4096 Jan 20 02:58 init
lrwxrwxrwx  1 root root      11 Aug 11  2018 init.d -> rc.d/init.d
-rw-r--r--  1 root root    884 Aug 17  2017 inittab
-rw-r--r--  1 root root    942 Jan 12  2010 inputrc
-rw-r--r--  1 root root    8510 Apr  1  2016 nanorc
lrwxrwxrwx  1 root root      7 Aug 11  2018 rc -> rc.d/rc
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc0.d -> rc.d/rc0.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc1.d -> rc.d/rc1.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc2.d -> rc.d/rc2.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc3.d -> rc.d/rc3.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc4.d -> rc.d/rc4.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc5.d -> rc.d/rc5.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc6.d -> rc.d/rc6.d
drwxr-xr-x 10 root root    4096 Aug 11  2018 rc.d
lrwxrwxrwx  1 root root      13 Aug 11  2018 rc.local -> rc.d/rc.local
lrwxrwxrwx  1 root root      15 Aug 11  2018 rc.sysinit -> rc.d/rc.sysinit

Code:

[krishnar@ip-172-26-5-82]/etc% cat inittab | grep -v #
id:3:initdefault:
[krishnar@ip-172-26-5-82]/etc%

Any help would be appreciated!

scasey 04-01-2019 05:55 PM

This seems to have lots of good information.

michaelk 04-01-2019 06:57 PM

Just as a frame of reference what distribution/version are you running. From the output of the inittab i.e. a single line, the init system is upstart and 3 would indicate no GUI so probably RHEL/CentOS 6 or a really old version of Fedora. Except for CentOS 6 and as far as I know no other current distribution still uses upstart.

As posted by searching the internet you can find lots of information on SySV init which explains how the /etc/init.d,/etc/rcX.d directories and K/S start/stop scripts work.

http://www.linux-magazine.com/Online...hat-is-Upstart
https://www.digitalocean.com/communi...-how-to-use-it

http://www.yolinux.com/TUTORIALS/Lin...itProcess.html


All times are GMT -5. The time now is 05:23 PM.