|
From: | Christian Franke |
Subject: | Re: [PATCH] hdparm.mod - get/set ATA disk parameters |
Date: | Sat, 21 Feb 2009 19:00:06 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |