Discussion:
hdparm usage
(too old to reply)
dave
2012-06-09 16:42:45 UTC
Permalink
Just been trying hdparm (Windows version) on xp. Some of its commands
work ok but

hdparm -B 255(4) /dev/hda
gives an error:-
HDIO_DRV_CMD failed i/o error

However, if I try that same hdparm command (same version too) on the
same xp system but under cygwin it gives no error.

(Whether it's actually working in either case I am not sure).

I thought maybe the "/dev/hda" was a problem under xp but "hda"
doesn't work either.

Any ideas?
Adrian C
2012-06-09 17:08:55 UTC
Permalink
Post by dave
Just been trying hdparm (Windows version) on xp. Some of its commands
work ok but
hdparm -B 255(4) /dev/hda
gives an error:-
HDIO_DRV_CMD failed i/o error
However, if I try that same hdparm command (same version too) on the
same xp system but under cygwin it gives no error.
(Whether it's actually working in either case I am not sure).
I thought maybe the "/dev/hda" was a problem under xp but "hda"
doesn't work either.
Any ideas?
/dev/sda ?
--
Adrian C
dave
2012-06-10 00:48:12 UTC
Permalink
Post by Adrian C
Post by dave
Just been trying hdparm (Windows version) on xp. Some of its commands
work ok but
hdparm -B 255(4) /dev/hda
gives an error:-
HDIO_DRV_CMD failed i/o error
However, if I try that same hdparm command (same version too) on the
same xp system but under cygwin it gives no error.
(Whether it's actually working in either case I am not sure).
I thought maybe the "/dev/hda" was a problem under xp but "hda"
doesn't work either.
Any ideas?
/dev/sda ?
tried /dev/sda - same result.
Jaimie Vandenbergh
2012-06-10 01:52:06 UTC
Permalink
Post by dave
Just been trying hdparm (Windows version) on xp.
For future reference, when asking about odd programs it'd be useful
for you to say *which* version, since there are many. A pointer to
where you got it from would be ideal.

Also, you should be aware that many of hdparm's instructions to the
drives are destructive, or can be if used inappropriately. You're
talking direct to the drive firmware here. Be very wary.
Post by dave
Some of its commands work ok but
hdparm -B 255(4) /dev/hda
gives an error:-
HDIO_DRV_CMD failed i/o error
However, if I try that same hdparm command (same version too) on the
same xp system but under cygwin it gives no error.
Are you sure it will ever work outside cygwin? If it's built to use
the cygwin1.dll then it won't do anything without.

Cygwin creates a unixish environment - and /dev/hda is a unixish path
that doesn't exist in Windows.
Post by dave
(Whether it's actually working in either case I am not sure).
Most hdparm options will tell you what the current state is, if you
don't set a new one. So:

hdparm -B /dev/hda

should read out the parameter as it is set on the drive.

There should be a terse help page under
hdparm -h

otherwise websearch up "hdparm man page" to get the full reference.
Post by dave
I thought maybe the "/dev/hda" was a problem under xp but "hda"
doesn't work either.
Any ideas?
It's working in cygwin, so use it that way?

If you like, you could try
hdparm c:
or hdparm c
but I don't hold out much hope.

Cheers - Jaimie
--
"Frankly, I have no feelings towards penguins one way or the other"
- Arthur C. Clarke
Mike Tomlinson
2012-06-10 05:53:12 UTC
Permalink
Post by Jaimie Vandenbergh
If you like, you could try
or hdparm c
but I don't hold out much hope.
C: would refer to a partition, not the raw drive, which I think is what hdparm expects.

Long shot - OP could try the Windows internal device ID:

C:\>wmic diskdrive list brief
Caption DeviceID Model PartitionsSize
Hitachi HUA722020ALA330 \\.\PHYSICALDRIVE1 Hitachi HUA722020ALA330 1 2000396321280
M4-CT128M4SSD2 \\.\PHYSICALDRIVE0 M4-CT128M4SSD2 1 128034708480

so:

hdparm -B \\.\PhysicalDrive0

(disclaimer: I don't know what -B does and can't be arsed reading the manpage. Use at
your own risk.)
--
(\_/)
(='.'=)
(")_(")
Continue reading on narkive:
Loading...