LinuxQuestions.org
Visit Jeremy's Blog.
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 11-06-2009, 01:32 PM   #1
neeraj123
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Rep: Reputation: 0
system halts after typing init 0. why?


i am using redhat linux enterprise edition. when i execute the command init 0, all the processes were stopped and i am getting the following message:

Unmounting file systems:
halting system:
md:stopping all md devices:
flushing ide devices:hda hdc
Power down.


the cursor waits in the next line and system never shuts down.
could anyone solve my problem? If i use ctr+alt+del, system reboots.
 
Old 11-06-2009, 01:53 PM   #2
JamesChamberlain
Member
 
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47

Rep: Reputation: 18
Can you post the output of /var/log/messages ?

Why use init 0 as opposed to shutdown command ?
 
Old 11-06-2009, 06:03 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
.. because halting is the very definition of "init 0" ?

Is your question why the server doesn't then power off? Please be clear.

Do try using the "shutdown" command instead of "init 0".
 
Old 11-06-2009, 06:16 PM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,787

Rep: Reputation: 211Reputation: 211Reputation: 211
What they mean...

http://en.wikipedia.org/wiki/Runlevel

Last edited by thorkelljarl; 11-07-2009 at 04:33 PM.
 
Old 11-07-2009, 01:22 PM   #5
neeraj123
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Hi james,

here are the /var/log/messages

localhost kernel:kernel log daemon terminating.
localhost syslog:klogd shutdown succeeded
localhost exiting on signal 15
localhost syslogd 1.4.1:restart

Hi Alucardzero,
You are right. I will be more specific. I want the system to poweroff. what should i do in this case? One of my friend when uses init 0, system will shutdown and power gets off.
Also, i used "shutdown -a now", but no use
 
Old 11-07-2009, 01:29 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

You could 'man shutdown';

Quote:
excerpt from 'man shutdown';

shutdown - bring the system down

SYNOPSIS
/sbin/shutdown [-t sec] [-arkhncfFHP] time [warning-message]

DESCRIPTION
shutdown brings the system down in a secure way. All logged-in users are notified that the sys-
tem is going down, and login(1) is blocked. It is possible to shut the system down immediately
or after a specified delay. All processes are first notified that the system is going down by
the signal SIGTERM. This gives programs like vi(1) the time to save the file being edited, mail
and news processing programs a chance to exit cleanly, etc. shutdown does its job by signalling
the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, run-
level 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where
administrative tasks can be performed; this is the default if neither the -h or -r flag is given
to shutdown. To see which actions are taken on halt or reboot see the appropriate entries for
these runlevels in the file /etc/inittab.

OPTIONS
-a Use /etc/shutdown.allow.

-t sec Tell init(8) to wait sec seconds between sending processes the warning and the kill sig-
nal, before changing to another runlevel.

-k Don't really shutdown; only send the warning messages to everybody.

-r Reboot after shutdown.

-h Halt or poweroff after shutdown.
How about using 'shutdown -h now'?
 
Old 11-08-2009, 06:13 AM   #7
JamesChamberlain
Member
 
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47

Rep: Reputation: 18
Quote:
Originally Posted by AlucardZero View Post
.. because halting is the very definition of "init 0" ?

Is your question why the server doesn't then power off? Please be clear.

Do try using the "shutdown" command instead of "init 0".
I'm aware of what init 0 does . If you read, i asked why he was using init 0 OPPOSED to using shutdown -h now, if he had a specific reason for doing so?

Please try the shutdown cmd
 
Old 11-08-2009, 12:16 PM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
I was not answering your post.
 
Old 11-10-2009, 04:28 AM   #9
neeraj123
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
i thank everyone for your revert. i used "shutdown -h now". server doesn't power off.
 
Old 11-10-2009, 04:49 AM   #10
JamesChamberlain
Member
 
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47

Rep: Reputation: 18
I found this on another forum, perhaps this would help?:

Give apm a shot. When you boot, go into the grub menu and press "e" to edit the ubuntu selection. Edit the kernel like by pressing "e" again. Go to the end of the line and add "apm=force" and hit enter. Then press "b" to boot.

If that fixes it, add "apm=force" to the line in /boot/grub/menu.list

## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash apm=force

Then run

sudo update-grub.

You can also see what your bios is set to (apm or acpi)
 
Old 11-10-2009, 04:20 PM   #11
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
i dont think halt and poweroff are the same thing, it just so happens that when most modern computers 'halt', they also poweroff. Try 'shutdown -P now'
 
Old 11-10-2009, 05:28 PM   #12
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,330

Rep: Reputation: 227Reputation: 227Reputation: 227
how about just shutdown now?
 
Old 11-10-2009, 05:56 PM   #13
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,787

Rep: Reputation: 211Reputation: 211Reputation: 211
Isn't it...

Isn't the command "halt -p", to halt then poweroff? Note that "shutdown" may be automatically invoked. "halt -p" will always shut the system down and kill the power.

http://linux.die.net/man/8/halt

Last edited by thorkelljarl; 11-10-2009 at 06:02 PM.
 
Old 11-10-2009, 06:56 PM   #14
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
that's what i'm saying. So halt then poweroff suggests that halt and poweroff are different
 
  


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
System Halts during boot up cricballa Linux - Distributions 1 06-11-2007 10:56 PM
File system halts Wolf_Assassin Linux - Software 8 08-17-2004 05:15 AM
Redhat 9 halts at init eth0 stephanp2002 Red Hat 2 06-28-2004 06:27 PM
kernel halts, system halts, computer commits suicide stupid_guy Linux - Newbie 10 06-07-2003 06:44 PM
Rh9 Halts System During Use atlantis Linux - Hardware 3 05-11-2003 10:36 AM


All times are GMT -5. The time now is 12:57 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