LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-15-2008, 10:14 PM   #1
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 369
Blog Entries: 1

Rep: Reputation: 38
Placing a Hard-drive in standby at boot.


I understand that the answer to this is probably some basic script using:

hdparm -y /dev/hda

However, I don't know where/how to put it to get the result I'm looking for.

Background....

I dual-boot to WinXP verrrry rarely. The only partitions on /dev/hda are NTFS for WinXP and I NEVER access them in Linux. However, when the system boots, it spins up and stays powered. Now the kernel checks for it at boot, examines it, and then I never use it again. I would like part of the boot sequence to automatically spin it down. The drive does not support sleep, but it does support standby (is there really a difference?). On the fly I can issue the above hdparm command to do what i need.

Thanks!
 
Old 04-15-2008, 10:17 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Why don't you put the command in rc.local?
 
Old 04-15-2008, 10:25 PM   #3
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 369
Blog Entries: 1

Original Poster
Rep: Reputation: 38
Thanks for your quick reply!

One question though...

once I open rc.local with mcedit (hey, I like it) how does it format it? (not so good with scripting)
 
Old 04-15-2008, 10:37 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If the corredt command is

hdparm -y /dev/hda

just put

/path/to/hdparm -y /dev/hda

as the last line in rc.local. I'd guess the corrct path is /bin or similar, but I can't see from where I am at present
 
Old 04-15-2008, 10:44 PM   #5
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 369
Blog Entries: 1

Original Poster
Rep: Reputation: 38
that's it????

No "if", "for", "fi", or whatever???? ok, I think I can do that.

Thanks!
 
Old 04-15-2008, 11:09 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'd try it that way. Putting it in rc.local is just the same as running it mannualy at the end of the boot process.
 
Old 04-15-2008, 11:20 PM   #7
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 369
Blog Entries: 1

Original Poster
Rep: Reputation: 38
hdparm is in /usr/sbin. Will it run w/o being root?
 
Old 04-15-2008, 11:50 PM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It will be run as root
 
  


Reply

Tags
hdparm, standby


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop standby on Maxtor external hard drive? M$ISBS Linux - Hardware 7 12-16-2007 09:14 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
Placing /boot and /home in different partitions during the installation. Milosevic Slackware 2 01-26-2006 04:52 PM
loggers are ruining hard drive standby... help slinky2004 Linux - General 1 11-09-2005 03:31 PM
boot from floppy drive then insall linux redhat9 from HARD DRIVE Shiraz Ahmed Linux - Software 0 08-23-2004 05:11 AM


All times are GMT -5. The time now is 03:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration