LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-08-2014, 07:55 PM   #1
derive
Member
 
Registered: Apr 2014
Distribution: debian
Posts: 42

Rep: Reputation: Disabled
reboot without an init running?


Is there a way to power-cycle the machine without a "real" init?
I use a *very* simple bash script on that server, it works perfectly, the only problem is that I cannot reboot the system.
I can remount the rootfs to ro, etc... but is there a file in /proc for example, or some other method to "reset" the system?
Or maybe a simple binary? I can't find this part in sysv init's source
 
Old 04-08-2014, 08:37 PM   #2
derive
Member
 
Registered: Apr 2014
Distribution: debian
Posts: 42

Original Poster
Rep: Reputation: Disabled
Finally I got it!

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

This hard resets the machine ( if the magic sysreq is in the kernel )
 
  


Reply



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
The init-script is not started during reboot thomas2004ch Linux - Software 23 08-09-2013 05:35 AM
Unable to shutdown, reboot, halt, init 6, init 0 procfs Linux - Newbie 6 07-23-2012 02:58 AM
script under /etc/init.d can not be started by reboot thomas2004ch Linux - Software 4 11-15-2011 05:22 AM
Init 6 and reboot rakesh.tandur Linux - Kernel 3 02-02-2009 05:57 AM
control reboot, init 6 ,shutdown paulmccs Linux - General 3 02-27-2002 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:45 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
Open Source Consulting | Domain Registration