From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Law9G-0002kF-56 for mharc-grub-devel@gnu.org; Sat, 21 Feb 2009 13:00:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Law9F-0002jv-BX for grub-devel@gnu.org; Sat, 21 Feb 2009 13:00:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Law9B-0002ho-Eh for grub-devel@gnu.org; Sat, 21 Feb 2009 13:00:20 -0500 Received: from [199.232.76.173] (port=42185 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Law9B-0002hf-CD for grub-devel@gnu.org; Sat, 21 Feb 2009 13:00:17 -0500 Received: from mailout05.t-online.de ([194.25.134.82]:53612) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Law9A-0002IA-Q5 for grub-devel@gnu.org; Sat, 21 Feb 2009 13:00:17 -0500 Received: from fwd02.aul.t-online.de by mailout05.sul.t-online.de with smtp id 1Law98-0000QM-02; Sat, 21 Feb 2009 19:00:14 +0100 Received: from [10.3.2.2] (SmSoOmZX8hVTXqNozSeql2Ia51k7lzPVNl9uk1-sOEG7iyERvJ0ybAwVrr8Ed8PZiR@[217.235.212.251]) by fwd02.aul.t-online.de with esmtp id 1Law90-0mZsgK0; Sat, 21 Feb 2009 19:00:06 +0100 Message-ID: <49A04126.3080008@t-online.de> Date: Sat, 21 Feb 2009 19:00:06 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: <497B9D35.5010703@t-online.de> <20090207213813.GF6343@thorin> <498E0F4F.6000503@t-online.de> <20090207225921.GX6343@thorin> <498E1560.7060106@t-online.de> <20090208003247.GA17277@thorin> <4994A0FF.5060808@t-online.de> <4996D18B.2060505@t-online.de> <20090221130511.GD16068@thorin> In-Reply-To: <20090221130511.GD16068@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: SmSoOmZX8hVTXqNozSeql2Ia51k7lzPVNl9uk1-sOEG7iyERvJ0ybAwVrr8Ed8PZiR X-TOI-MSGID: d27947a1-64e9-499e-97a1-b432ce3a5850 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] hdparm.mod - get/set ATA disk parameters X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2009 18:00:21 -0000 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