LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   system halts after typing init 0. why? (https://www.linuxquestions.org/questions/linux-newbie-8/system-halts-after-typing-init-0-why-767357/)

neeraj123 11-06-2009 12:32 PM

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.

JamesChamberlain 11-06-2009 12:53 PM

Can you post the output of /var/log/messages ?

Why use init 0 as opposed to shutdown command ?

AlucardZero 11-06-2009 05:03 PM

.. 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".

thorkelljarl 11-06-2009 05:16 PM

What they mean...

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

neeraj123 11-07-2009 12:22 PM

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

onebuck 11-07-2009 12:29 PM

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'?

JamesChamberlain 11-08-2009 05:13 AM

Quote:

Originally Posted by AlucardZero (Post 3747619)
.. 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 :)

AlucardZero 11-08-2009 11:16 AM

I was not answering your post.

neeraj123 11-10-2009 03:28 AM

i thank everyone for your revert. i used "shutdown -h now". server doesn't power off.

JamesChamberlain 11-10-2009 03:49 AM

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)

themanwhowas 11-10-2009 03:20 PM

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'

smeezekitty 11-10-2009 04:28 PM

how about just shutdown now?

thorkelljarl 11-10-2009 04:56 PM

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

themanwhowas 11-10-2009 05:56 PM

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


All times are GMT -5. The time now is 08:32 PM.