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
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel