Wink Saville’s Blog

April 19, 2008

linux - Excessive hard disk activity (or how to execute something while booting)

Filed under: linux — wink @ 11:01 am

A common problem encountered with laptop is that there is excessive activity due to the heads being loaded and unloaded frequently as described here. The solution for my HP zv5000 laptop was to use hdparm to disable advanced power management:

hdparm -B 255 /dev/sda

Since this needs to be performed every time the system boots you need to figure out a good place for the code. For Ubuntu I chose to add it to /sbin/setup.sh which is a script exectued by the The solution I used with Ubuntu was to add the above line to /sbin/setup.sh. In my case /sbin/setup.sh didn’t exist so I created it, be sure it’s executable.

When I changed my laptop to use Fedora I found the same problem, but Fedora doesn’t exectue /sbin/setup.sh instead I found the suggested mechanism was to add the code to file /etc/rc.d/rc.local.

Powered by WordPress