Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I restart init?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
transpetaflops
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 159

PostPosted: Fri Jun 11, 2010 11:36 am    Post subject: How do I restart init? Reply with quote

Is there a way to restart init without rebooting and killing my uptime?
Back to top
View user's profile Send private message
MacGyver031
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2004
Posts: 141
Location: Ilavalai, Sri Lanka

PostPosted: Fri Jun 11, 2010 2:05 pm    Post subject: Reply with quote

Hey,
Are you looking for something like
Code:
kexec
??
This would execute another Kernel without going through the firmware-reboot sequence (as in startup a new kernel without executing BIOS and bootloader stage).
_________________
Sincerely your
Joanand K.

MacBook Pro 5.1: 2.4GHz Core2 Duo, 4096MB, 500GB, NVidia 9400/9600 M GT
Gentoo, Kernel 3.4.9, XOrg, Fluxbox.
Back to top
View user's profile Send private message
MacGyver031
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2004
Posts: 141
Location: Ilavalai, Sri Lanka

PostPosted: Fri Jun 11, 2010 2:11 pm    Post subject: Reply with quote

Here is an interesting blog: http://www.linux.com/archive/feature/150202
_________________
Sincerely your
Joanand K.

MacBook Pro 5.1: 2.4GHz Core2 Duo, 4096MB, 500GB, NVidia 9400/9600 M GT
Gentoo, Kernel 3.4.9, XOrg, Fluxbox.
Back to top
View user's profile Send private message
transpetaflops
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 159

PostPosted: Fri Jun 11, 2010 2:57 pm    Post subject: Reply with quote

I don't need to boot another kernel. Just want to reinitialize the init process with all the rc scripts from scratch.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Fri Jun 11, 2010 3:00 pm    Post subject: Reply with quote

man telinit
Back to top
View user's profile Send private message
transpetaflops
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 159

PostPosted: Fri Jun 11, 2010 4:44 pm    Post subject: Reply with quote

telinit u seems to be the appropriate choice but nothing much happens. If I first go to single user mode with telinit s and then restart with telinit 3 it seems to do what I want although it doesn't kill every user process in single user mode. Can someone confirm this is the correct method?
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Sat Jun 12, 2010 2:14 am    Post subject: Reply with quote

To do this on gentoo I use
Code:
rc single
You'll get the "Give root password for maintenance or hit ctrl-D to continue", if you continue you'll go back to runlevel 3, if you give the password you'll get a shell and ps should show you no processes running (except init and your shell, of course).

EDIT: I take it that what you want to do is fully restart the system, rather than just restarting the init process per se? telinit u will re-exec init but it's not something you'd usually need to do.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum