Ozy de Jong wrote:
> I'm currently investigating some optimizations for my smartmontools for Windows installer.
> One of them is making USB drive contextual menus for smart options working.
> I found a small issue:
> Using the following i can read the smart status of my external USB drive:
> smartctl -a /dev/sdb
> Using the "windows" drive name instead of a linux drive name does not work:
> smartctl -a d:
> Can it be that feeding smartctl with a windows drive name instead of a linux one ignores device type detection ?
When drive letters (which denote logical partitions, not physical
drives) are used, smartctl opens the device "\\.\X:" instead of
"\\.\PhysicalDriveN" or "\\.\ScsiN". It then relies on the
(undocumented) feature that ATA/SCSI pass-through I/O-controls actually
access the underlying physical drive.
Unfortunately the current heuristics for USB Id detection (through WMI)
always requires a physical drive number. Querying partition <> drive
mapping under Windows is complex and not implemented yet.
Note that it will never be possible to use drives letters in conjunction
> Also, as i cannot modify my registry entry which gives a windows drive as argument, is there any way to fix this issue ?
USB drives work with drive letters if the device type (-d sat) is specified.