This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem reading physical drive data with Windows 8 and cygwin, data is truncated by 288 sectors


There appears to be a problem with reading of physical drive data
from device files like /dev/sdN etc.

E.g. a 8GB USB flash drive device with the PC booted on Linux and
then on Windows running cygwin. The device names are different but
they both refer to the same USB flash drive.

On Linux:

dd bs=512 if=/dev/sdg of=/dev/null
15695872+0 records in
15695872+0 records out
8036286464 bytes (8.0 GB) copied, 256.769 s, 31.3 MB/s

On Windows 8 and cygwin:

dd bs=512 if=/dev/sdh1 of=/dev/null
15695584+0 records in
15695584+0 records out
8036139008 bytes (8.0 GB) copied, 306.072 s, 26.3 MB/s

A difference of 288 sectors.

This is not a partition table issue as the flash drive is not partitioned.

Those 8036139008 bytes do exactly match the first 8036139008 of
the 8036286464 read on the Linux system so it is definitely the
same device.

If I write a small python script and run it with the Windows
version of python with the script reading from file \\.\PhysicalDrive7
(which is where the flash drive appears on my system) the script is
able to read the entire 8036286464 byte flash drive contents and I
can verify an exact match with the contents read on the Linux system.

I see from the mailing list archives that lseek() is not
supported on physical drives. This should not be the issue here
as dd is just doing a sequential read starting from the first
sector of the flash drive.

I am running Windows 8 release preview build 8400. I do not know
if this is a Windows 8 issue or a cygwin issue.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]