cancel
Showing results for 
Search instead for 
Did you mean: 

Linux not shutting down :-(

JD_5
Frequent Advisor

Linux not shutting down :-(

I try shutting down the computer, but the system hangs at the
message (from the screen):
______________________________
>The system will be halted Immediately.
> Master resource control: runlevel 0 has been reached
>Skipping services in runlevel 0: personal-firewall.initial
______________________________

HELP! The only thing I can think of is that I switched on my screen
saver a few sessions ago, and
It just started for the first time in the session when the problem
started. But I'm just a newbie so I really don't know whether this could be the problem or not. I'm positive I didn't touch the personal-firewall.initial file. I know from a few messages back that it says its unused. I'm scared now to even turn on Linux because I know it won't stop. ITS GONE MAD. >:-)

1) Is it safe to just flip the switch after this message? When is it
safe to flip the switch if it hangs?

2) Is there a file somewhere that lists the logout proceedures?

3) Where is the file that the computer runs for logging out?

4) Is there documentation somewhere about the shutdown proceedure so I can learn a bit more on what is happening and why its happening...

:-/
7 REPLIES
I_M
Honored Contributor

Re: Linux not shutting down :-(

Hi

shutdown procedure
1) login as root user
2) # cd /
3) # sync;sync
4) # shutdown -h 0
5) If your system support APM, system will power off.
If your system don't support APM, the power is keep on. You will see" system halted" message on the console. Which mean, you may power off your system.

Regards,
JD_5
Frequent Advisor

Re: Linux not shutting down :-(

??? Sorry, I don't understand your
response. My system does support
APM and it usually does turn it self
off... However its not anymore.
I don't mind flipping the switch
myself but the computer never
gives me a message like "Its safe to Turn computer off now...".

I don't even know if its suppose to...
Vladislav Demidov
Honored Contributor

Re: Linux not shutting down :-(

Hello
1. It relatively save to just flip the switch if your box hangs. You just may lost some application data. It also may affect filesystem integrity but all modern filesystems are able to repair themself automatically.

2. It depends on Linux version you have. Usually shutdown procedure runs scripts from /etc/rc.d/rc?.d catalogs.
3. It depends on wich runlevel your linux system is operating and what the next runlevel is. There are some runlevels:
0 - shutdown and halt
6 - shutdown and reboot
Usually system runs all stop scrips from current run level /etc/rc.d/rc.d/K*
and then runs all start scripts for the next runlevel /etc/rc.d/rc.d/S*
4. www.linuxdoc.org
http://www.redhat.com/docs/manuals/linux/
Mubedi Kaninda
Occasional Visitor

Re: Linux not shutting down :-(

Most systems I have worked with do not power off after a shutdown command (shutdown or init 0).

The machine will not give you windows' "Its safe to Turn computer off now...", but the screen should say something like "power down" or "Master resource control: runlevel 0 has been reached".

It is then okay to turn off the machine.

Hope this helps.


Ron Kinner
Honored Contributor

Re: Linux not shutting down :-(

Since it says you have reached run level 0 it's going to be messing around in the /etc/rc.d/rc0.d/ directory trying to run any files it finds that start with K. Apparently one of them is not completing. do
ls /etc/rc.d/rc0.d
and see what you find there. They may link to files in the /etc/rc.d/init directory. I think it just executes the files in numerical order so see if you can find the K file that kills the firewall. The next one after that is probably where the problem is happening. When I get something like this I go into the K file and add echo statements (each on its own line in the appropriate place in the code) such as

echo "starting Kx"

and

echo "finished Kx"

This causes it to print to the console as it starts the file and then when it ends. If I see it get through one file then I try the next until I locate the evil doer.

You might also look in /var/log/ and see if any of the log files tell you anything.

Ron
Christoph Rothe_3
Frequent Advisor

Re: Linux not shutting down :-(

Ron,

I do not think so. At least my linux box (SuSE) prints "Runlevel x reached" AFTER executing those scripts starting with the Letter "K".

Possibly those scripts are not present or - probably - you made some changes to /etc/inittab ?

Christoph
Bill Thorsteinson
Honored Contributor

Re: Linux not shutting down :-(

It is possible the screen saver changed some APM settings or is causing the APM module to be unloaded. This could cause the powerdown not occur.

If APM is loaded as a module check the output of 'lsmod' to see if it is loaded. You may want to put a call to this in your level 0 K* scripts.