LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 03-04-2005, 01:40 PM   #1
vinaybms
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Rep: Reputation: 0
Method to reinitialize init process whithout rebooting the system


Hi geeks,

Is there any Method to reinitialize init process whithout rebooting the system. I mean the init process should be killed and reinitialized to previous state. if u know pls respond as quick as possible.

Thanks in advance.

Vinay
 
Old 03-04-2005, 01:51 PM   #2
dwrose
LQ Newbie
 
Registered: Mar 2005
Location: Massachusetts
Distribution: SuSE Linux 10.0
Posts: 19

Rep: Reputation: 0
Quick googling shows that /sbin/telinit -q will send the init process the correct signals to have it reread inittab. Note: playing around with init is not for the faint of heart. You should really know what you are doing or its possible to disable part or all of your system. There is also in the man page of init description of how to test init by running it in user space using an alternate directory as the root as far as the test is concerned.

Here is an excerpt from its man page:

TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-
character argument and signals init to perform the appro-
priate action. The following arguments serve as direc-
tives to telinit:

9 March 1998 2

0,1,2,3,4,5 or 6
tell init to switch to the specified run level.

a,b,c tell init to process only those /etc/inittab file
entries having runlevel a,b or c.

Q or q tell init to re-examine the /etc/inittab file.

S or s tell init to switch to single user mode.

U or u tell init to re-execute itself (preserving the
state). No re-examining of /etc/inittab file hap-
pens. Run level should be one of Ss12345, otherwise
request would be silently ignored.

telinit can also tell init how long it should wait between
sending processes the SIGTERM and SIGKILL signals. The
default is 5 seconds, but this can be changed with the -t
sec option.

telinit can be invoked only by users with appropriate
privileges.

The init binary checks if it is init or telinit by looking
at its process id; the real init's process id is always 1.
From this it follows that instead of calling telinit one
can also just use init instead as a shortcut.
 
Old 03-04-2005, 04:38 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
If you are using Solaris 10, you can use zones.
Each zone has its own init process so you can effectively restart a zone (i.e. reboot it) in seconds, without hard rebooting the system, so with the kernel staying alive.
FreeBSD Jails may provide this or a similar feature too.
 
Old 03-05-2005, 04:46 AM   #4
vinaybms
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hi jlliagre,

Thanks for your reply, I am using solaris 8. could you please tell me if there is an equivalent thing in solaris 8?
 
Old 03-05-2005, 06:40 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Nope, this is one of the new features of Solaris 10. Why not upgrading ? Solaris 10 is free.
 
  


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
A Method to reinitialize init process whithout rebooting the system vinaybms Solaris / OpenSolaris 1 03-04-2005 03:39 PM
init process gets stucked prital Linux - Software 0 02-21-2005 06:52 AM
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 04:19 AM
Self Rebooting System hubergeek Linux - General 2 06-11-2003 09:36 PM
Slackware init process.... hjles Slackware 2 01-30-2003 03:44 PM


All times are GMT -5. The time now is 01:14 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration