LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2008, 04:26 PM   #1
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Rep: Reputation: 15
init


After booting, kernel passes control over to /sbin/init .



What is this /sbin/init ???
 
Old 09-12-2008, 04:29 PM   #2
darthaxul
Member
 
Registered: Aug 2008
Distribution: Gentoo; VoidLinux; Funtoo
Posts: 214

Rep: Reputation: 18
the mother of all processes
 
Old 09-12-2008, 04:31 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,793

Rep: Reputation: 292Reputation: 292Reputation: 292
init is a program which starts all your processes. There is a longer explanation in the man pages. See:

man init

Here is another explanation of what init does:

http://tldp.org/LDP/sag/html/init-intro.html

--------------------
Steve Stites
 
Old 09-13-2008, 01:47 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
The kernel gives birth to init, and init gives birth to the first processes, including those that accept your login and shell creation. And init will reap the corpses of dead children left behind by uncaring parents.
 
Old 09-13-2008, 02:08 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Another one.

First, it comes the bootloader, usually grub or lilo in pc architectures. The bootloader is not linux yet, it's outside the OS.

The bootloader loads a kernel, this kernel boots and gives life to all your hardware, making it accesible for the rest of the system.

Once that is done, the kernel calls the init process, that process starts the basic services, including those that allows you to login in your machine. After that, you have the control.

Init is the first process that's started in linux, it always has the PID number 1. The rest of them are its descendants in one or another way.
 
Old 09-13-2008, 02:36 AM   #6
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Original Poster
Rep: Reputation: 15
U did some research and found that after init, following scripts are executed..

1. /etc/rc.d/rc.sysinit (to set up script environment)
2. /etc/inittab (to run default run level)
3. /etc/rc.d/init.d/functions (to run various start up functions)


is that true ????is anything missing ???/
 
Old 09-13-2008, 03:46 AM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
The init process reads /etc/inittab to determine which processes to start. The scripts in rc.d are called in response to the contents of /etc/inittab and are invoked based on the init run level
 
Old 09-13-2008, 07:01 AM   #8
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Original Poster
Rep: Reputation: 15
is that mean...init process executes and reads the files specified in step 1,2 and 3 ???
 
Old 09-13-2008, 09:46 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by lipun4u View Post
is that mean...init process executes and reads the files specified in step 1,2 and 3 ???
No--that's not what he said.
init first looks at /etc/inittab. based on what it finds there, it goes on to run other scripts.

BUT---what about systems that don't use inittab?

To really get to the bottom of this, you could look at the source code for init....Here is a link for SysVinit:
http://freshmeat.net/projects/sysvinit/
 
Old 09-13-2008, 10:58 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
People above describe a tipical sysV init system. But don't forget that, even if it's the most broadly used init system, sysV init is not the-one-and-only.

There are many init systems besides sysV alikes. BSD-like init systems are used in lots of distros, and some newer ones like einit or initng. Some other distros, like Gentoo, have their own init systems.

Most of them vary on the implementation details, though really most of them are configured in a very similar way. The bigger differences in which regards administration usually are on the way that runlevels are implemented, but it really depends on what init systems you want to compare.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernal panic no init found try passing init option to kernel m2azer Linux - General 3 11-08-2007 02:51 PM
exec of init (/sbin/init) failed!!! kernel panic KiraII Linux - Kernel 1 07-13-2007 10:07 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-19-2004 12:10 AM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 11:18 PM


All times are GMT -5. The time now is 06:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration