I want to install Ubuntu on a USB drive and found these instructions here.

I want to do this, because I want to use my laptop when I am in a car or when I walk. So, I want to turn off my hard drive when booting from USB to prevent it to cause bad sectors, etc.

Now my question is: how to manually turn off the hard drive when booting from USB? Or, does it turn off when isn't in use or being mounted?

  • How much shaking do you expect? Most modern Laptops will handle a light beating, even with the disk spinning. The disk should be powered, but idle when you don't mount it. – Gant Nov 20 '13 at 11:48
  • If the disk is idle (despite it is on) is shaking it will damage it? – SayyedAli Nov 20 '13 at 11:51
  • Not more than it would be when turned on. You can still crash a head with the disk powered off. But as I mentioned, unless you are driving on very uneven surfaces or trip constantly when taking a walk, modern HDDs wouldn't mind. – Gant Nov 20 '13 at 11:54
  • I think you mean: not more than it would be when turned off. does it? – SayyedAli Nov 22 '13 at 7:58

Here are the steps to take your hard disk to enter standby mode (or to sleep mode). This gets HDD to spin down and park the heads to landing zones so that the chances of a head crash is nullified.

  1. Boot the Ubuntu liveCD/DVD/USB.

  2. If the HDD that you're trying to take to standby mode has a swap-partition (likely if you have Ubuntu installed in your HDD as well), turn it off.

    sudo swapoff -a (This turns off all devices marked as swap)

  3. Now to make your HDD enter low power consumption standby mode:

    sudo hdparm -y /dev/sdX where sdX is the target HDD, and X in sdX should be replaced appropriately (with a, b, c, ..., z); assuming it to be sda, the command would look like this: sudo hdparm -y /dev/sda

    Or you could make your HDD enter the lowest power consumption sleep mode, causing it to shut down completely with:

    sudo hdparm -Y /dev/sdX (sdX should be the target device)

That's it! You can then continue using your live Ubuntu session.

(Note: Modern laptops use "self-park" for better & safe portability.)

PS. This method of putting a HDD to standby mode can prove helpful also when you want to be a little economical on power consumption. Especially in desktop computers, if you have more that one internal HDDs, you can power down those which you use very less than often.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.