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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-06-2009, 12:32 PM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 4
Rep:
|
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.
|
|
|
11-06-2009, 12:53 PM
|
#2
|
Member
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47
Rep:
|
Can you post the output of /var/log/messages ?
Why use init 0 as opposed to shutdown command ?
|
|
|
11-06-2009, 05:03 PM
|
#3
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
.. 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".
|
|
|
11-06-2009, 05:16 PM
|
#4
|
Senior Member
Registered: Jun 2008
Posts: 1,821
|
Last edited by thorkelljarl; 11-07-2009 at 03:33 PM.
|
|
|
11-07-2009, 12:22 PM
|
#5
|
LQ Newbie
Registered: Nov 2009
Posts: 4
Original Poster
Rep:
|
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
|
|
|
11-07-2009, 12:29 PM
|
#6
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,976
|
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'?
|
|
|
11-08-2009, 05:13 AM
|
#7
|
Member
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47
Rep:
|
Quote:
Originally Posted by AlucardZero
.. 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 
|
|
|
11-08-2009, 11:16 AM
|
#8
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
I was not answering your post.
|
|
|
11-10-2009, 03:28 AM
|
#9
|
LQ Newbie
Registered: Nov 2009
Posts: 4
Original Poster
Rep:
|
i thank everyone for your revert. i used "shutdown -h now". server doesn't power off.
|
|
|
11-10-2009, 03:49 AM
|
#10
|
Member
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47
Rep:
|
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)
|
|
|
11-10-2009, 03:20 PM
|
#11
|
Member
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 218
Rep:
|
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'
|
|
|
11-10-2009, 04:28 PM
|
#12
|
Senior Member
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
|
how about just shutdown now?
|
|
|
11-10-2009, 04:56 PM
|
#13
|
Senior Member
Registered: Jun 2008
Posts: 1,821
|
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 05:02 PM.
|
|
|
11-10-2009, 05:56 PM
|
#14
|
Member
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 218
Rep:
|
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 01:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|