All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] hdparm.mod - get/set ATA disk parameters
Date: Sat, 21 Feb 2009 19:00:06 +0100	[thread overview]
Message-ID: <49A04126.3080008@t-online.de> (raw)
In-Reply-To: <20090221130511.GD16068@thorin>

Robert Millan wrote:
> On Sat, Feb 14, 2009 at 03:13:31PM +0100, Christian Franke wrote:
>   
>> insmod ata_pthru
>>     
>
> (note that module dependencies should make this unnecessary)
>
>   

This insmod is necessary for now. hdparm.mod does not directly call 
ata_pthru.mod, it uses kern/disk.c::grub_disk_ata_pass_through function 
pointer instead. Otherwise, using other future ata_pass_through 
functions (e.g. from some ahci.mod :-) would not be possible.

Another drawback of a hdparm->ata_pthru dependency would be that 'help' 
or 'hdparm -h' would load ata.mod which disables e.g. biosdisk.mod.


>> insmod hdparm
>>
>> # Make sure disks cannot be locked by an ATA password
>> hdparm --quiet --security-freeze (ata4)
>> hdparm --quiet --security-freeze (ata6)
>>
>> menuentry "Boot" {
>>
>>  # Check health
>>  if hdparm --quiet --health (ata4) ; then echo -n ; else
>>    echo "Warning: SMART status check failed"
>>    read
>>  fi
>>
>>  # Set boot disk to "fast", disable spin down
>>  hdparm --quiet --aam=254 --standby-timeout=0 (ata4)
>>
>>  # Set other disk to "quiet", spin down after 5min inactivity
>>  hdparm --quiet --aam=128 --standby-timeout=60 (ata6)
>>
>>  # Boot ...
>> }
>>
>> menuentry "Memory Test" {
>>
>>  # Spin down both disks after 10min
>>  hdparm --quiet --standby-timeout=120 (ata4)
>>  hdparm --quiet --standby-timeout=120 (ata6)
>>
>>  # Load memtest ...
>> }
>>     
>
> Very interesting.  Do you think any of these features could be useful as a
> default option in grub-mkconfig?
>
>   

At least the --health check and --security-freeze are IMO recommended 
for each disk. Both is also done by a typical PC BIOS. AAM and standby 
settings are more user specific. The problem is that this relies on 
native ATA support which is now only available for controllers supported 
by ata.mod.

At least for the boot disk, such hdparm calls could be added by e.g. 
extending 'prepare_grub_to_access_device'.

Christian




  reply	other threads:[~2009-02-21 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-24 22:59 [PATCH] hdparm.mod - get/set ATA disk parameters Christian Franke
2009-02-07 21:38 ` Robert Millan
2009-02-07 22:46   ` Christian Franke
2009-02-07 22:59     ` Robert Millan
2009-02-07 23:12       ` Christian Franke
2009-02-08  0:32         ` Robert Millan
2009-02-09 19:42           ` Christian Franke
2009-02-12 22:21           ` Christian Franke
2009-02-14 14:13             ` Christian Franke
2009-02-21 13:05               ` Robert Millan
2009-02-21 18:00                 ` Christian Franke [this message]
2009-02-21 19:51                   ` Robert Millan
2009-02-21 20:38                     ` Christian Franke
2009-02-21 20:46                       ` Robert Millan

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=49A04126.3080008@t-online.de \
    --to=christian.franke@t-online.de \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.