Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Power off hard disk right before computer power off?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
shazza
n00b
n00b


Joined: 18 Oct 2003
Posts: 71
Location: Marburg, Germany

PostPosted: Tue Mar 07, 2006 9:03 am    Post subject: Power off hard disk right before computer power off? Reply with quote

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
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Tue Mar 07, 2006 9:08 am    Post subject: Reply with quote

if /dev/hda is your hd:
Code:

/sbin/hdparm -qy /dev/hda

_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
shazza
n00b
n00b


Joined: 18 Oct 2003
Posts: 71
Location: Marburg, Germany

PostPosted: Tue Mar 07, 2006 11:45 am    Post subject: Reply with quote

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
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Tue Mar 07, 2006 1:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum