Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The following are not properly recognized as flash drives #242

Closed
pbatard opened this issue Dec 6, 2013 · 17 comments
Closed

The following are not properly recognized as flash drives #242

pbatard opened this issue Dec 6, 2013 · 17 comments
Assignees
Milestone

Comments

@pbatard
Copy link
Owner

pbatard commented Dec 6, 2013

The following is a list of devices improperly identified by Rufus as HDDs and eliminated from the default list (the version in bold is the one in which the drives should be properly recognized):

  • 'Staples Relay UFD USB Device' (0781:5202) → score 3 [v1.4.2]
  • 'SanDisk Cruzer Glide USB Device' (0781:5575) → score 3 [v1.4.2]
  • 'SanDisk Cruzer Edge USB Device' (0781:556B) → score 3 [v1.4.2]
  • 'SanDisk Extreme USB Device' (0781:5580), with the FIXED flag set → score 3 [v1.4.2]
  • 'TOSHIBA TransMemory USB Device' (0930:6544) → score 8
  • 'TOSHIBA TransMemory USB Device' (0930:6545) → score 8
  • 'Kingston DataTraveler [G3|2.0] USB Device' (0930:6545) → score 5 [v1.4.2]
@ghost ghost assigned pbatard Dec 6, 2013
pbatard added a commit that referenced this issue Dec 15, 2013
* This should address the improperly listed UFDs from #242
@slukovic
Copy link

slukovic commented Jan 1, 2014

I've just tried alpha version 1.4.2.366 and my SanDisk Extreme 32GB device isn't identified as USB drive. It does show up as fixed drive in Windows Explorer, but even when "List USB Hard Drives" box is checked Rufus says "0 devices found".

Can I help you somehow with this?

@slukovic
Copy link

slukovic commented Jan 1, 2014

Here is log file (not very informative though):

Rufus version 1.4.2.366
Windows version: Windows 8.1 64-bit
LCID: 0x0409
0 devices found <-- on start up
0 devices found <-- checked List USB Hard Drives

@pbatard
Copy link
Owner Author

pbatard commented Jan 1, 2014

Since you are using Windows 8+, my guess is that your SanDisk Extreme is enumerated as an UASP device rather than a regular USB Mass Storage device. Unfortunately, it looks like SanDisk are putting many different versions of their USB 3.0 Extreme devices out there (some with the removable bit enabled, some disabled, some without UASP, and apparently some with) and of course, they don't bother telling anyone what they may get or offer a tool that allow you to change these properties, so users are left in the dark.

I do have an enhancement request to add UASP support in Rufus (#229), but I don't have any UASP hardware to test with yet... I'm trying to see if I can do something about that to try to speed up the inclusion of UASP support if it turns out there are flash drives with UASP support out there.

Can I please ask you to try to confirm that your device is seen as UASP in Windows. Can't really help you there, as I have no idea how Windows will report a device is UASP. Maybe the device manager will tell you?
You could also try to plug it to an USB 2.0 port, if you have one (or use an USB 2.0 extension cord if you don't), and see if it is detected better.

For the record, I too have a SanDisk Extreme (16GB model) and it is detected just fine in Windows 8.1 x64.

@slukovic
Copy link

slukovic commented Jan 1, 2014

OK, I did some debugging and found couple of problems with my SanDisk device.

The first problem which immediately disqualifies it from being even considered as UFD is here, as reported enumerator name is SCSI not USBSTOR.

Even when I change continue to printing a warning this piece of code doesn't get VID and PID correctly. devid_list seems to be OK, but I'm not sure what goes on here.

Because of this IsHDD returns positive value (+3 for DRIVE_FIXED, 0 for 32GB, but not -5 for SanDisk VID).

Anyway I tweaked the code just enough to be able to successfully detect my device and make it bootable. I must commend the state of this project, this is one of the rare OS projects which I managed to build "out of box" in VisualStudio. Thanks for that.

Anyway, I think you're aware that you are fighting a loosing battle with smart UFD detection as you've already stated in code comments. I understand the importance of not showing real HDD as it is dangerous and can be quite costly for users, but may be you should consider another checkbox in advanced section which would show every detected device. Of course it should come with big fucking warning!

PS. Plugging it in USB2.0 port doesn't help.

edit: fixed some links...

@pbatard
Copy link
Owner Author

pbatard commented Jan 1, 2014

The first problem which immediately disqualifies it from being even considered as UFD is here, as reported enumerator name is SCSI not USBSTOR.

Which would be indicative of Windows seeing the device as UASP rather than USB Mass Storage.
USBSTOR is what Windows uses for USB Mass Storage, SCSI is what it uses for SCSI or SATA (and most likely UASP), so I'm pretty positive that your issue comes from your drive being seen as UASP by Windows 8.1.

And for what is worth, I most certainly don't want to blindly list drives with SCSI enumerator, as it would give to much of an opportunity for people to inadvertently format internal SATA HDDs with valuable data, which is the last thing I want. The removal of anything that's not USBSTOR is very very deliberate. Until UASP, no USB mass storage device was ever expected to be listed under anything else but USBSTOR.

this piece of code doesn't get VID and PID correctly

No surprise there. If your device is not reported by Windows as being USB, which is exactly what happens if its enumerator is SCSI, then you can't expect much from the regular USB APIs. I do expect to have to modify a lot of code to support UASP, since it changes the deal completely, and I'll also have to make sure that no standard SATA drive, which will also be under the SCSI enumerator, is ever listed.

Anyway, I think you're aware that you are fighting a loosing battle with smart UFD detection

No. I'm only fighting a losing battle when Microsoft and others starts to call a cat (USB) a dog (SCSI).

I'm pretty confident your issue is with UASP, as this is exactly what UASP is all about (make believe that an USB drive is an SCSI drive, and try to hide everything USB under the hood). So this means changing the whole enumeration paradigm and other time consuming stuff. But I already have the enhancement request logged, and I'll be getting UASP hardware to implement it eventually... But there's a reason why UASP support is targeted at a major version rather than the next minor bump: it will take time to implement properly.

Of course it should come with big fucking warning!

You'd be amazed at the number of users that ignore big fucking warnings. I've had quite a few complaints about losing valuable data on a drive they were supposed to know was about to be formatted, even after every single format operation in Rufus does display a massive BIG LETTER warning.

So, if I have to take my pick, I'd rather inconvenience users like you for some time, while I add UASP support in as foolproof a way as I can make it, than risk anyone losing valuable data because they fumbled around to try to get any device listed (maybe their USB drive isn't plugged properly) and aren't computer literate enough to understand that the drive they just got listed, and that they are about to format, is not their USB drive at all, but a very valuable internal disk.

Believe me, I can see way too many scenarios where grandma Jones is going to format the one drive where she keeps all the pictures of her grandchildren, while thinking she is formatting an USB drive. Rufus is designed to be used by everybody and their grandmother, so avoiding destruction of valuable data, even if this can only be as a result of user error, is paramount!

PS. Plugging it in USB2.0 port doesn't help.

Interesting... So it looks like the UASP translation layer might also be working over USB 2.0 after all...

Still, I'd appreciate if you can see anything that Windows says, confirming that it enabled UASP for your drive. From everything you reported above, your drive is in UASP mode, so I'm hoping their is some means to actually confirm that in one of the Windows UIs.

And for the time being, you can just keep following #229, which I'll try to bump if UASP starts to spread more rapidly than I anticipated.

@slukovic
Copy link

slukovic commented Jan 1, 2014

I couldn't find anything in Windows UI which distinguishes SanDisk from my SSD and HDDs. It is reported as "SanDisk Extreme SCSI Disk Device" and it is listed under Disk Drives in Device Manager. It must be in UASP mode but Windows doesn't say anything about USB part.

So, if I have to take my pick, I'd rather inconvenience users like you for some time, while I add UASP support in as foolproof a way as I can make it, than risk anyone losing valuable data because they fumbled around to try to get any device listed (maybe their USB drive isn't plugged properly) and aren't computer literate enough to understand that the drive they just got listed, and that they are about to format, is not their USB drive at all, but a very valuable internal disk.

Can't argue with this.

@pbatard
Copy link
Owner Author

pbatard commented Jan 1, 2014

Thanks for the report. I guess since the purpose of UASP is to make an USB drive looks exactly like an SCSI one, Windows not reporting anything different might not be too surprising.

Also, I have decided to bite the bullet and just ordered an UASP HDD enclosure, so I'm hoping to be able to check out UASP myself very soon...

@suum
Copy link

suum commented Jan 6, 2014

I found the same issue with this SanDisk devices:
Found device 'SanDisk Cruzer Edge USB Device' (0781:556B)
Device eliminated because it was detected as an USB Hard Drive (score 3 > 0)
(Version 1.4.1 (Build 348)
Can this be solved for 1.4.2 too?
The device is a very new 16 GB Stick Strange: In the shop they offered this type and Toshiba which also appears in the list above.

@pbatard
Copy link
Owner Author

pbatard commented Jan 6, 2014

Pretty sure the latest BETA will solve your issue.
Can you please test and confirm? Thanks.

@suum
Copy link

suum commented Jan 7, 2014

Great!
The BETA 1.4.2 (Build 372) detected the Cruzer Edge device immediately!
It could be used then and booted with Free Dos
That's fine. Thank you very much!

@pbatard
Copy link
Owner Author

pbatard commented Jan 7, 2014

@slukovic,

Got my UASP enclosure today.

I couldn't find anything in Windows UI which distinguishes SanDisk from my SSD and HDDs

This uasp should tell you, in device manager, if you have a disk running in UASP mode. Won't tell you which one, but if you plug/unplug the device, that should be easy to figure out, as the highlighted entry will disappear if there are no more disks running in UASP mode.

I have now added UASP support to the latest v1.4.2 BETA. Can you please download BETA 2 and confirm that it is able to list your drive?

@slukovic
Copy link

slukovic commented Jan 9, 2014

Hello Pete,

I checked Device Manager a week ago, and as I said, couldn't distinguish SanDisk from the rest of the HDDs.

devices

In the mean time I found one distinction. USB drive is listed under 'Send To' right-click submenu when you select any file.

Anyway, I can now confirm that SanDisk is listed by BETA 2 version. Great work, thanks!

Rufus version 1.4.2.375
Windows version: Windows 8.1 64-bit
LCID: 0x0409
Found USB device 'SanDisk Extreme USB Device' (0781:5580)
1 device found
Sector Size: 512 bytes
Cylinders: 3892, TracksPerCylinder: 255, SectorsPerTrack: 63
Partition type: GPT, NB Partitions: 1
Disk GUID: {1D338C58-D08F-4503-9411-1626874C4FB7}
Max parts: 128, Start Offset: 17408, Usable = 32017013248 bytes
Partition 1:
Type: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
Name: 'Microsoft Basic Data'
ID: {3B89DA39-0786-4D21-B530-E6A99B44298F}
Size: 29.8 GB (32015982080 bytes)
Start Sector: 2048, Attributes: 0x0000000000000000
Checking for Rufus updates...
Checking release channel...
No new release version found.

@slukovic
Copy link

slukovic commented Jan 9, 2014

Another remark... I didn't have to check 'List USB Hard Drives' it got detected straight away.

@pbatard
Copy link
Owner Author

pbatard commented Jan 18, 2014

All the problematic UFD detection issues should now have been fixed with 1.4.2. Closing.

@pbatard pbatard closed this as completed Jan 18, 2014
@pbatard pbatard reopened this Jan 22, 2014
@pbatard
Copy link
Owner Author

pbatard commented Jan 22, 2014

The TOSHIBA drives are still not detected as of v1.4.3:

Found USB device 'TOSHIBA TransMemory USB Device' (0930:6545)
Device eliminated because it was detected as an USB Hard Drive (score 8 > 0)

Reopened.

pbatard added a commit that referenced this issue Jan 22, 2014
@pbatard
Copy link
Owner Author

pbatard commented Feb 26, 2014

Closed with the 1.4.4 release

@pbatard pbatard closed this as completed Feb 26, 2014
@lock
Copy link

lock bot commented Apr 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@lock lock bot locked and limited conversation to collaborators Apr 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants