I have a Linux based (Debian 5.0) NAS that I need to shutdown reliably. When ssh'd into the NAS box I issue the following command:
sudo shutdown -h now
I've also tried 'poweroff' and su'ing into root and running the commands with the same results. It shuts down all the processes and everything fine but does not always 'halt' the system. I need it to power down into the S3 state so that I can reliably use Wake On LAN to start the unit as needed. For what it's worth, wol works great and works every time as long as the unit is in it's S3 state.
Humm could be a number of things. First thing I would try is to pass either
or even
to the kernel command line to see either of them works.
Next I would try unloading the wireless drivers before you shutdown (if possible).
Try the halt -p or poweroff commands.
I finally diagnosed the problem with this particular NAS backup server. It appears that the graphics card died at some point. Since this unit is run remotely via ssh it's only two lifelines are it's ethernet cable and it's power cord. Consequently, the dead graphics card went totally unnoticed. Putting in a new graphics card has solved the problem completely. I also did a lot of work to the unit to make sure that it has better airflow and much less heat build up since it is located in a place that is not very well ventilated and I believe that this may have been the cause of the graphics card failure. It could have just been the age of the graphics card but since I had the unit out I decicded to update/upgrade it's thermal properties just to be on the safe side.
I have had similar problems, I just issue a
halt
instead, and it seems to work fine.