View previous topic :: View next topic |
Author |
Message |
shazza n00b


Joined: 18 Oct 2003 Posts: 71 Location: Marburg, Germany
|
Posted: Tue Mar 07, 2006 9:03 am Post subject: Power off hard disk right before computer power off? |
|
|
Hi there,
I noticed something strange the other day: Whenever I shutdown Windows on my notebook, it turns off the harddisk right before turning the whole system off. However, when I want Linux to turn off my PC, the hard disk makes a rather loud noise right before complete power off. My guess is, that the hard disk is still spinning at full speed and needs to park its heads very quickly then.
Any ideas how I can avoid this? Perhaps by powering off the harddisk after unmounting all filesystems? What program would I use to get this done? |
|
Back to top |
|
 |
JeliJami Veteran


Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
Posted: Tue Mar 07, 2006 9:08 am Post subject: |
|
|
if /dev/hda is your hd:
Code: |
/sbin/hdparm -qy /dev/hda
|
_________________ Unanswered Post Initiative | Search | FAQ
Former username: davjel |
|
Back to top |
|
 |
shazza n00b


Joined: 18 Oct 2003 Posts: 71 Location: Marburg, Germany
|
Posted: Tue Mar 07, 2006 11:45 am Post subject: |
|
|
Thanks.
Forgive my stupidity, but I think theres something missing in my understanding of the Gentoo runlevel thing. Where exactly are the scripts that are being run when the system is shutting down? I read through the Gentoo handbook which stated that there is an "internal" runlevel called 'shutdown' but there is e.g. no such directory in /etc/runlevels.
Also it doesn't seem the be the case that the scripts in /etc/init.d are simply called with the stop argument in reverse boot order.
So where would I put this hdparm statement? It should happen as the last thing in the shutdown process (or at least after the local filesystems are unmounted).
If anyone knows about some tutorial about the Gentoo runlevel thing that goes into detail - I'd also be interested to know about it. Thanks. |
|
Back to top |
|
 |
JeliJami Veteran


Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
Posted: Tue Mar 07, 2006 1:01 pm Post subject: |
|
|
you could probably use the hdparm command above in the /etc/init.d/halt.sh script,
somewhere at the end, maybe in the ups_kill_power function?
anyone else with a better idea? _________________ Unanswered Post Initiative | Search | FAQ
Former username: davjel |
|
Back to top |
|
 |
|