linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Henner Eisen <eis@baty.hanse.de>
To: toa@pop.agri.ch
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: ibook, hda power off sequence (for IBM travelstar)
Date: 11 Jan 2001 01:37:52 +0100	[thread overview]
Message-ID: <ou1yuaappb.fsf@baty.hanse.de> (raw)
In-Reply-To: Andreas Tobler's message of "Mon, 08 Jan 2001 15:32:29 +0100"


>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:

    Andreas> I'm also interested in this fix since I got my travelstar
    Andreas> DJSA-220 finally to work on a WALLSTREET! I remarked the
    Andreas> same noisy click and since the troubles I had with a dead
    Andreas> toshiba I pay very much attention to strange noises.

I just replaced the original 3GB hard disk (Fujitsu MHH 2032AT) of my
revision 1 iBook by a 20 MB (Toshiba MK2016GAP) drive. This works without
problems, except that halting the machine now also causes a rather noisy hard
drive click.

A quick fix to remove this for init-controlled shutdown is
to just append a `hdparm -Y' to the /etc/rc.d/halt script such
that the drive will put into sleep mode before power is switched off.

The only problem is that `hdparm' cannot be the very last command because
the last command needs to be `reboot' or `halt'. One needs to make sure
that `reboot' or `halt' is already in the buffer cache before it is
executed -- otherwise, the system will restart the hard drive in
order to read the `halt' or `reboot' executable from disk. In order to
get them (and the portions of the shell that will execute it) into the
buffer cache, some dummy access to these objects need to be made before
hdparm is called. The follwing modification to the tail of SuSE 6.4
/etc/rc.c/halt scripts causes the HD noise on power down to disappear.
I guess it should work similarly for all sysvinit based systems.


 mount -no remount,ro / 2> /dev/null
 sync

 echo $message
+cat /sbin/$command > /dev/null
+( exec /bin/echo > /dev/null )
+hdparm -Y /dev/hda
 exec $command -d -f


Henner

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-01-11  0:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06 22:28 ibook, hda power off sequence (for IBM travelstar) Conrad H Ziesler
2001-01-08 11:26 ` Benjamin Herrenschmidt
2001-01-08 14:32   ` Andreas Tobler
2001-01-11  0:37     ` Henner Eisen [this message]
2001-01-12 14:56       ` Karim Yaghmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ou1yuaappb.fsf@baty.hanse.de \
    --to=eis@baty.hanse.de \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=toa@pop.agri.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).