Stop your Hd from spinning when running Puppy from Usb

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

Stop your Hd from spinning when running Puppy from Usb

#1 Post by backi »

How to stop your Hardisk from spinning when running Puppy from Usb-Stick in frugal mode when not in use.

One day i found it quite annoying when using Puppy from a Usb-Stick in frugal mode that hardisk on my machine keeps spinning without any purpose.

So i found something that could be useful for everyone .

It is just a little script ....first :
install hdparm (if not already installed )
Make a script ----

#!/bin/bash
hdparm -y /dev/sdx

So sdX is your Hardrive .

make it executable
.....and click on it ...your Hardisk will stop spinning .
In case you get access to your Harddrive again after using it ....click again.
You can put this script into your Startup folder ..so it will prevent your Harddisk from spinning after bootup ....while not in use.
Probably saves your Accus some power .
Last edited by backi on Sun 10 Jul 2016, 05:43, edited 4 times in total.

april

#2 Post by april »

where did you install hdparm from then ?

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#3 Post by backi »


Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#4 Post by Atle »

This is interesting, as many would possibly like to launch spinnoff or whatever, where the non competent user can know for sure their Puppy Live WILL NOT even attempt to spinn the HD for even a second, giving them assurance against any interference with their paid and sometimes precious Windows installation.

I would not mind to have that as a concept as many are afraid of Linux messing up their Windows.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#5 Post by backi »

Hi !
In case you mount your HardDisk for getting acces to it it will spin again .
But just click this little script it will stop spinning immediately .

april

#6 Post by april »

Interesting . Seems it is in Puppy precise 5.7.1 already /sbin/hdparm

Code: Select all

# hdparm -y /dev/sda

/dev/sda:
 issuing standby command
# hdparm -y /dev/sr0

/dev/sr0:
 issuing standby command
#  

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#7 Post by greengeek »

backi wrote:In case you mount your HardDisk for getting acces to it it will spin again .
But just click this little script it will stop spinning immediately .
There is also a way to shut the disk off "permanently" for the duration of the current powered session (ie: running pmount or other disk access will not be able to wake it up until after next reboot). However - please note this warning:
*** only use the following method for a disk that IS NOT USED AS YOUR BOOT DISK OR YOUR SAVEFILE DISK
EDIT : As Backi mentioned below - the disk can also be accessed if there is a "swap" partition on it and the system will try to spin it up again - so I need to also mention this addition to the warning above - Do not use this method below if your hard drive has a swap partition
(On my usb puppies I create a swap partition on the usb stick)

See this post:
http://www.murga-linux.com/puppy/viewto ... 606#549606

It works great on my machine as a power saver.

***********************

EDIT:
I just want to tie together several common threads detailing disk spindown:

http://www.murga-linux.com/puppy/viewto ... 606#549606

http://www.murga-linux.com/puppy/viewto ... 641#770641

http://murga-linux.com/puppy/viewtopic. ... 135#652135

http://murga-linux.com/puppy/viewtopic.php?t=107442
Last edited by greengeek on Wed 20 Jul 2016, 20:17, edited 1 time in total.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#8 Post by backi »

Hi greengeek !
I just want to tie together several common threads detailing disk spindown:
This would be quite a good idea .
I have forgotten to mention ....if your ram is going low
and starts swapping , Hard-drive is also spinning again .

Greetings !!

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#9 Post by Atle »

This ram is low thing and the swapping can only happen if there is a swap partition on the drive.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#10 Post by greengeek »

backi wrote:I have forgotten to mention ....if your ram is going low
and starts swapping , Hard-drive is also spinning again .
Very good point. I have now edited my post above to include that warning. Not a good idea to permanently spin down the drive if there is a swap partition on it.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#11 Post by backi »

How to disable Ram
swapoff /dev/sdXy
.....where X is your drive... y is partition number .

Enable Ram again:

swapon /dev/sdXy

Post Reply