Verification fails on recent Windows 8.1/10 systems

USB Image Tool support forum
Post Reply
vesa.karvonen
Posts: 2
Joined: Mon Sep 28, 2015 8:52 am

Verification fails on recent Windows 8.1/10 systems

Post by vesa.karvonen » Mon Sep 28, 2015 8:56 am

Hi!

We have a .Net application for bulk USB stick preparation that uses usbitcmd
(1.70) to write the sticks. Our app starts usbitcmd processes essentially as

usbitcmd.exe r DEVICE koe.dd /p /d /s /v

when we use usbitcmd to write and verify. This used to work fine on Windows 7
and Windows 8 and still works fine on Windows 7. However, on updated Window 8
(8.1) and Windows 10 systems the verification step now fails frequently, but not
always, with the output

Error: Device and image are different!

However, manual verification (by reading back the stick image and comparing to
the written image) shows that the disk was written without errors.

One thing we noticed is that recent Windows versions attempt to write the file

System Volume Information\IndexerVolumeGuid

if it doesn't exist and apparently managed to write the file in time to mess up
verification. So, we now work around this by having that file already in the
disk image.

However, even with that work around, verification still fails. Our app is
typically used to launch several usbitcmd processes in parallel and the
verification failure happens more frequently when used through our app.
However, we have managed to reproduce the verification failure also by running
usbitcmd from the command prompt.

Any idea on what might cause verification to fail on recent Windows versions?
How could the verification problem be fixed?

You should be able to download our ClickOnce installable USB writing utility
from here:

http://static.abitti.fi/AbittiUSB/prod/setup.exe

The GUI is in Finnish and Swedish only. To try writing with verification,
you can follow the following steps:

Install and run the AbittiUSB program - you need to grant admin rights

Click "Asetukset" (top-right)
(Settings)
Click "Varmenna opiskelijoiden tikut" to make it checked
(This turns on verification)
Click "Tallenna asetukset"
(Save settings)

Click "Lataa uusin versio" under "Opiskelijan tikku"
(This downloads and uncompresses the "Opiskelijan tikku" disk image)

Insert one or more USB sticks with at least 4GB capacity
(You should see the stick appear in the bottom section)
Click to check/select the added USB sticks
Click "Kirjoita opiskelijan tikuiksi"
(Write stick with the "Opiskelijan tikku" image)

After the disk image (koe.dd) has been downloaded to

Users/???/AppData/Local/YtlDigabi

you can also try to write it from the command line using usbitcmd. It is more
difficult, but possible, to reproduce the problem from the command line. It may
be necessary to run multiple usbitcmd proceses in parallel (writing to different
USB sticks/devices) and may need to be done several times.

Regards,
Vesa Karvonen

Alex
Site Admin
Posts: 233
Joined: Fri Jul 29, 2011 11:59 pm

Re: Verification fails on recent Windows 8.1/10 systems

Post by Alex » Mon Sep 28, 2015 7:43 pm

Thanks for reporting this in detail. I will try to have a look investigate this this weekend.

Alex
Site Admin
Posts: 233
Joined: Fri Jul 29, 2011 11:59 pm

Re: Verification fails on recent Windows 8.1/10 systems

Post by Alex » Mon Sep 28, 2015 8:08 pm

I did some quick searching and found this:
http://answers.microsoft.com/en-us/wind ... 3f5?auth=1

For a short time between restore and verify I probably unlock the device. Maybe when Windows occasionally tries to write/update these files in that time period, verification fails, because the device is now already different from the image. I guess I can try to keep the device locked between restore and verify.

vesa.karvonen
Posts: 2
Joined: Mon Sep 28, 2015 8:52 am

Re: Verification fails on recent Windows 8.1/10 systems

Post by vesa.karvonen » Wed Oct 14, 2015 4:06 pm

Thanks for the link! We tried disabling indexing of removable drives (via registry DisableRemovableDriveIndexing) and it seems that verification works after changing the setting and rebooting. We can now suggest that as a workaround.

Of course, it would be better if it would not be necessary to change system settings. The idea of keeping the device locked sounds good. Did you have a chance to try it yet?

Alex
Site Admin
Posts: 233
Joined: Fri Jul 29, 2011 11:59 pm

Re: Verification fails on recent Windows 8.1/10 systems

Post by Alex » Thu Oct 15, 2015 6:59 pm

I checked this and there is indeed a small time window where the device gets unlocked between restore and verify. Unfortunately it seems a little bit more work and code restructuring to fix it, so it's not completed yet.

Post Reply