[ITP] hdparm 6.9

Christian Franke Christian.Franke@t-online.de
Wed Feb 28 22:39:00 GMT 2007


I would like to contribute my Cygwin port of hdparm.

Hdparm (http://sourceforge.net/projects/hdparm) is a Linux tool to 
get/set ATA/SATA drive parameters and driver settings.

A HDIO_DRIVE_CMD ioctl emulation layer is used to provide the drive 
related command subset of hdparm on Windows.
It should work on XP SP2 and 2003 if driver provides ATA_PASS_THROUGH. 
It also supports 2000 and XP SP1 if undocumented IDE_PASS_THROUGH is 
available.

http://franke.dvrdns.org/cygwin/release/hdparm/hdparm-6.9-1.tar.bz2
http://franke.dvrdns.org/cygwin/release/hdparm/hdparm-6.9-1-src.tar.bz2
http://franke.dvrdns.org/cygwin/release/hdparm/setup.hint

Examples:
hdparm -I /dev/sda     -- print disk information and current settings
hdparm -M 128 /dev/sda -- set acoustic management to "quiet"
hdparm -M 254 /dev/sda -- set acoustic management to "fast"
hdparm -S 120 /dev/sdb -- set 2nd disks standby timeout to 10min
hdparm -y /dev/sdb     -- set 2nd disk to standby mode
hdparm -t /dev/sda     -- perform disk read timings
hdparm --security-freeze /dev/sda -- Freeze security settings
(There are still BIOS versions which leave the drive vulnerable)


Supported command subset:

hdparm - get/set hard disk parameters - version v6.9-20070228 (Cygwin)

Usage:  hdparm  [options] [device] ..

Device:
 /dev/hd[a-z]    harddisk 0,1,...
 /dev/sd[a-z]    harddisk 0,1,...
 /dev/scd[0-9]   cd-rom 0,1,...

Options:
 -A   set drive read-lookahead flag (0/1)
 -B   set Advanced Power Management setting (1-255)
 -C   check IDE power mode status
 --debug   enable debugging output
 --direct  use O_DIRECT to bypass page cache for timings
 -D   enable/disable drive defect management
 -f   flush buffer cache for device on exit
 -g   display drive geometry
 -h   display terse usage information
 -H   read temperature from drive (Hitachi only)
 -i   display drive identification
 -I   detailed/current information directly from drive
 --Istdin  read identify data from stdin as ASCII hex
 --Istdout write identify data to stdout as ASCII hex
 -K   set drive keep_features_over_reset flag (0/1)
 -L   set drive doorlock (0/1) (removable harddisks only)
 -M   get/set acoustic management (0-254, 128: quiet, 254: fast) 
(EXPERIMENTAL)
 -P   set drive prefetch count
 -q   change next setting quietly
 -s   set power-up in standby flag (0/1)
 -S   set standby (spindown) timeout
 -t   perform device read timings
 -T   perform cache read timings
 -v   defaults; same as -g for IDE drives
 -V   display program version and exit immediately
 -w   perform device reset (DANGEROUS)
 -W   set drive write-caching flag (0/1) (DANGEROUS)
 -X   set IDE xfer mode (DANGEROUS)
 -y   put IDE drive in standby mode
 -Y   put IDE drive to sleep
 -Z   disable Seagate auto-powersaving mode
 --security-freeze   Freeze security settings until reset
 (remaining ATA security commands were unavailable at build time)


Christian



More information about the Cygwin-apps mailing list