1

I have 3 drives in my laptop, one of which is a mechanical hard drive for mass storage. I want to set this drive to standby because I want to preserve energy and keep my laptop silent at startup.

Command to do this: hdparm -Y /dev/sdb

things I've tried:

But the drive is still spinning when I start Ubuntu. Can anyone help?

system information:

  • it's a toshiba mechanical drive
  • Ubuntu 14.04
  • laptop computer
TheSchwa
  • 3,820
  • Ok, a few things to lead you to a working solution. rc.local is run as root; so no need for sudo in commands. rc.local is run pretty early in the system boot, the PATH may not have your command in it. Try using this information to get it working: http://askubuntu.com/questions/297992/how-do-i-run-a-script-on-startup-as-superuser – Paul Tanzini Sep 11 '14 at 02:09

1 Answers1

0

I don't think you can prevent the hard drive from spinning up on boot. It is likely just your motherboard's POST or the BIOS probing the drive. Both actions are required for the hard drive to be accessible once you boot your Operating System.

The commands you posted in your question should indeed set the drive to standby after you login or during the Ubuntu boot process depending on which one you use.

TheSchwa
  • 3,820
  • of course I can't prevent my BIOS from spinning it up. I only want it to stop when ubuntu has started.

    the command that I posted does work, but I'm looking for a way to automate it so that I don't have to enter it every time.

    thank you for your answer

    – SnelleJelle Sep 10 '14 at 23:39