Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

[SOLVED] USBstick take letter D and not U


  • Please log in to reply
97 replies to this topic

#76
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
The "scheme" in the Windows 7 snippet you posted is remarkably similar to contents of key:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
in my XP (example):
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f56307-b6bf-11d0-94f2-00a0c91efb8b}\##?#USBSTOR#Disk&Ven_USB&Prod_DISK_2.0&Rev_1219#O29OXXJDI4BOBM6F&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

:hello:

jaclaz


How to remove advertisement from MSFN

#77
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
The posted snippets are from HKLM\SYSTEM\MountedDevices --> DosDevices...and ParrentIdPrefix which obviously plays role is not present in 7/Vista.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#78
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

The posted snippets are from HKLM\SYSTEM\MountedDevices --> DosDevices...and ParrentIdPrefix which obviously plays role is not present in 7/Vista.


OK,
then I simply don't get it. :w00t:

This (the windows 7 contents of HKLM\SYSTEM\MountedDevices--> DosDevices) :
_??_USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100#AA04015900000158&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
Seems to me similar to the contents of the key HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f56307-b6bf-11d0-94f2-00a0c91efb8b}\ on my XP:
##?#USBSTOR#Disk&Ven_USB&Prod_DISK_2.0&Rev_1219#O29OXXJDI4BOBM6F&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

Another one:
##?#USBSTOR#Disk&Ven_OTi&Prod_Flash_Disk&Rev_2.00#130B5F43D7479CD7&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
See below:
_??_USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100#AA04015900000158&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
##?#USBSTOR#Disk&Ven_USB&Prod_DISK_2.0&Rev_1219#O29OXXJDI4BOBM6F&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
##?#USBSTOR#Disk&Ven_OTi&Prod_Flash_Disk&Rev_2.00#130B5F43D7479CD7&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

What was the question?

Was it not how to create the contents of the DOSDEVICES key on a non-Windows 7 system? :unsure:

Can you expand on it?

jaclaz

Edited by jaclaz, 15 June 2009 - 08:32 AM.


#79
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
The question is how to create acceptable/working migrate.inf on Windows 7/Vista out of the info in MountedDevices, where apparently ParrentIdPrefix is not present.

Seems attachments in were not uploaded with my previous post, here are migrate.inf produced by MkMigrateInf_b.cmd for the same USB stick under XP and Windows 7. The latter does not work as expected, drive letter U: is not applied to the USB stick.

Attached Files


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#80
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

MountPoint = G:\
...
Volume DevID = STORAGE\REMOVABLEMEDIA\7&C0E6684&1&RM
Drive DevID = USBSTOR\DISK&VEN_JETFLASH&PROD_TS1GJF110&REV_0.00\5AD00F612A5447&0

At first glance:
Volume DevID is very similar to a XP MountedDevices.
Can a Windows 7 Volume DevID converted to a XP MountedDevices?

#81
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
That was the output from ListUsbDrives under XP SP3.

Here is output from the same program under Windows 7:
ListUsbDrives V1.7.9.22Lists attached USB drives and their USB port names for USBDLMFreeware by Uwe Sieber - www.uwe-sieber.deCan use the file usb.ids from [url="http://www.linux-usb.org/usb.ids"]http://www.linux-usb.org/usb.ids[/url] for USB device informationOperating System  = 6.1 SP0 type=1 suite=100 Win32Current User      = ilkoLogonType         = localMember of groups  = HomeUsers, AdministratorsAdmin             = noElevation type    = limitedMountPoint        = G:\Volume Label      = ---Volume Size       = 1 GB (NTFS)Volume Serial     = C434-F898Volume Name       = \\?\Volume{e84fe82b-5925-11de-a126-001422e056f4}\Partition Name    = \Device\Harddisk1\Partition1Bus Type          = USBDrive Type        = removableDevice Types      = ---NoMediaNoLetter   = configure >= 3INI Sections      = ---Drive DevID       = USBSTOR\DISK&VEN_LEXAR&PROD_JD_LIGHTNING_II&REV_1100\AA04015900000158&0Ctrl  DevID       = USB\VID_05DC&PID_A640\AA04015900000158Host Controller   = Intel® 82801FB/FBM USB2 Enhanced Host Controller - 265CVolume DosDevName = \Device\HarddiskVolume5Disk DosDevName   = \Device\00000060Removal Policy    = surprise removal ('Optimize for quick removal')Partition Number  = 1 of 1Friendly Name     = LEXAR JD LIGHTNING IIRequested Power   = 500 mA (bus powered)USB Version       = 2.0 (high speed)USB Friendl. Name = LEXAR MEDIA JD LIGHTNING IIUSB Serial        = AA04015900000158USB Port Name     = 5-8MountPoint        = H:\Volume Label      = ---Volume Size       = 1 GB (FAT)Volume Serial     = 90E4-5FE9Volume Name       = \\?\Volume{662b209a-59df-11de-9b1f-001422e056f4}\Partition Name    = \Device\Harddisk2\Partition1Bus Type          = USBDrive Type        = removableDevice Types      = ---NoMediaNoLetter   = configure >= 3INI Sections      = ---Volume DevID      = STORAGE\VOLUME\_??_USBSTOR#DISK&VEN_JETFLASH&PROD_TS1GJF110&REV_0.00#5AD00F612A5447&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B}Drive DevID       = USBSTOR\DISK&VEN_JETFLASH&PROD_TS1GJF110&REV_0.00\5AD00F612A5447&0Ctrl  DevID       = USB\VID_0457&PID_0151\5AD00F612A5447Host Controller   = Intel® 82801FB/FBM USB2 Enhanced Host Controller - 265CVolume DosDevName = \Device\HarddiskVolume6Disk DosDevName   = \Device\00000066Removal Policy    = surprise removal ('Optimize for quick removal')Partition Number  = 1 of 1Friendly Name     = JetFlash TS1GJF110Requested Power   = 98 mA (bus powered)USB Version       = 2.0 (high speed)USB Friendl. Name = USB Mass Storage DeviceUSB Serial        = 5ad00f612a5447USB Port Name     = 5-5

Search in Windows 7 registry for "C0E6684" or "16f722a4" returns no results.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#82
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

That was the output from ListUsbDrives under XP SP3.

Sorry, I misunderstood previous post.

ReactOS use a crc32 hash to create the ParentIdPrefix value.
http://reactos.freed...pnpmgr/pnpmgr.c
Does XP and ReactOS create a equal ParentIdPrefix value?

#83
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
ilko,
maybe I am still missing something, but do you have any reason/experience/documentation supporting the idea that a migrate.inf file is read at all during Windoows 7 setup? :unsure:

jaclaz

#84
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Lets make it clear :)

The point is to prepare USB stick with XP setup files under Vista/7, where the keys in MountedDevices cannot be used right away to create migrate.inf.

In other words- running MkMigrateInf.cmd under 7 (and most likely Vista too) produces migrate.inf file, which is not applied during XP setup due to the different values in MountedDevices and USB stick gets letter different than U:.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#85
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
Pfff, now I see.

You want to find the way Xp generates the value 7&16f722a4&0&RM in your example :), and find a way to generate it under Windows 7. :)

What does Windows 7 has in here?:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630a-b6bf-11d0-94f2-00a0c91efb8b}
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\STORAGE\RemovableMedia

:unsure:

jaclaz

#86
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Here is how ParentIDPrefix generated in 2000, most likely in XP too:

http://bbs.driverdev...d.php?tid=96099
http://translate.goo...e...3Den&num=50

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#87
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag

What does Windows 7 has in here?:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630a-b6bf-11d0-94f2-00a0c91efb8b}
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\STORAGE\RemovableMedia

First 2 are not present, as is the third one.

Under HKLM\SYSTEM\ControlSet001\Enum\STORAGE\ there are only Volume and VolumeSnapshot subkeys.

The equivalent of the third on would be:

HKLM\SYSTEM\ControlSet001\Enum\STORAGE\Volume\_??_USBSTOR#Disk&Ven_JetFlash&Prod_TS1GJF110&Rev_0.00#5ad00f612a5447&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#88
pSycho-Y2K

pSycho-Y2K

    Newbie

  • Member
  • 44 posts
  • Joined 20-October 04
  • OS:Windows 7 x64
  • Country: Country Flag
I have exactly the same problem as pipster :} Let me first give you guys the details:

- USB Flash Drive: Kingston DataTraveler 2.0 8GB
- Partition size: 8GB
- Filesystem: FAT32

I used the following guide by aviv00 (Post #1):
Guide - Install WinXP From HDD or USB Drive Or CD, 1.3 Final [2 Methods]

But, there was no migrate.inf involved.

I used MkMigratgeInf_b.cmd posted earlier in this thread and created a migrate.inf and moved it to $WIN_NT$.~BT
The output was unfortunately D: :}

Then, I used MkMigrateInf2.cmd from USB_MultiBoot_10 and created a migrate.inf and also moved it to $WIN_NT$.~BT
The output was also D: :}

As a last resort, I cleaned the USB device drivers with DriveCleanup, re-attached the USB Flash Drive, and tried the solution by piper copying the value of \DosDevice\G: into the migrate.inf (In my case it was G:), but it also didn't help :(

Then, I was thinking:
- Is migrate.inf called during the txt-setup with the guide by aviv00?
- Or is this only getting parsed with the USB_MultiBoot_10 solution? (since this is using a different approach installing XP)

I hope you guys can assist me like you did with pipster :)

Edited by pSycho-Y2K, 17 June 2009 - 01:53 PM.


#89
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Did you test on real hardware or on virtual machine?
Did you try to prepare the USB stick with the latest WinSetupFromUSB and see if USB stick gets letter U:?
Attach your current migrate.inf.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#90
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag

Here is how ParentIDPrefix generated in 2000, most likely in XP too:

http://bbs.driverdev...d.php?tid=96099
http://translate.goo...e...3Den&num=50


For one of my USB sticks ParentIDPrefix in XP is "16f722a4", it is CRC-32 hash of the uppercased unicode string:
USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\AA04015900000158&0
which is actually part of the registry subkey:
HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\AA04015900000158&0

The comments in the code given above explain fairly well what is what.

Next days will be trying to achieve this calculation in AutoIt.
If there is anyone interested- here is the code in C, which calculates CRC32 hash:

#define HASH_UNICODE_STRING( _pustr, _phash ) {							 \
	PWCHAR _p = (_pustr)->Buffer;										   \
	PWCHAR _ep = _p + ((_pustr)->Length/sizeof(WCHAR));					 \
	ULONG _chHolder =0;													 \
																			\
	while( _p < _ep ) {													 \
		_chHolder = 37 * _chHolder + (unsigned int) (*_p++);				\
	}																	   \
																			\
	*(_phash) = abs(314159269 * _chHolder) % 1000000007;					\
}

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#91
victor888

victor888

    Member

  • Member
  • PipPip
  • 155 posts
  • Joined 20-October 04
@ilko_t
Do you have interest calcaulate the hash value by win CMD?

#92
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
That would be perfect to be part of MkMigrateInf.cmd, can you help?

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#93
victor888

victor888

    Member

  • Member
  • PipPip
  • 155 posts
  • Joined 20-October 04
This page (http://www.lammertbi...alculation.html) maybe helpful.

I have to say I got wrong CRC32 hash value of ILKO_T "USBSTOR\DISK&VEN_LEXAR&PROD_JD_LIGHTNING_II&REV_1100\AA04015900000158&0" whose CRC32 value is "BAA13B1F" not "16f722a4"

#94
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
I am still not convinced that the hash is actually CRC32, plus the string must be converted to unicode.

Look at the HASH_UNICODE_STRING macro posted above, it differs from any other macros I saw for creating CRC32 hash.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#95
victor888

victor888

    Member

  • Member
  • PipPip
  • 155 posts
  • Joined 20-October 04
I don't know how to turn it into unicode too.

#96
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
About Unicode:
Since the original text is "plain" it should be simply that "normal" text, with 00's as separators, see here:
http://rishida.net/tools/conversion/



Input in "Mixed Input"
Check output as "Hexadecimal code points"

But there are endless types of encding that can be called "UNICODE"....

There are several CRC32 conventions:
http://en.wikipedia....putation_of_CRC

Now which CRC-32 is used?

And is it to be applied on a file containing the hex values? Or to what?

And WHICH "Unicode" are we talking about?

Using:
http://www.codeproje...x?display=Print

on a .txt file containing "plain" "USBSTOR\DISK&VEN_LEXAR&PROD_JD_LIGHTNING_II&REV_1100\AA04015900000158&0":
0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF
----------------------------------------------------------------
0x00: 5553 4253 544F 525C 4449 534B 2656 454E - USBSTOR\DISK&VEN
0x10: 5F4C 4558 4152 2650 524F 445F 4A44 5F4C - _LEXAR&PROD_JD_L
0x20: 4947 4854 4E49 4E47 5F49 4926 5245 565F - IGHTNING_II&REV_
0x30: 3131 3030 5C41 4130 3430 3135 3930 3030 - 1100\AA040159000
0x40: 3030 3135 3826 30					   - 00158&0

, I get: (rehash -none -crc32 originalascii.txt )
CRC-32	   : BAA13B1F

if I use this:
http://www.autohotke...topic10796.html
http://ringtail.its....ngo/uniconv.zip

As follows:
uniconv ASCII originalascii.txt Unicode11:big-endian test.txt
getting a file in UNICODE as described before:
0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF
----------------------------------------------------------------
0x00: 0055 0053 0042 0053 0054 004F 0052 005C - .U.S.B.S.T.O.R.\
0x10: 0044 0049 0053 004B 0026 0056 0045 004E - .D.I.S.K.&.V.E.N
0x20: 005F 004C 0045 0058 0041 0052 0026 0050 - ._.L.E.X.A.R.&.P
0x30: 0052 004F 0044 005F 004A 0044 005F 004C - .R.O.D._.J.D._.L
0x40: 0049 0047 0048 0054 004E 0049 004E 0047 - .I.G.H.T.N.I.N.G
0x50: 005F 0049 0049 0026 0052 0045 0056 005F - ._.I.I.&.R.E.V._
0x60: 0031 0031 0030 0030 005C 0041 0041 0030 - .1.1.0.0.\.A.A.0
0x70: 0034 0030 0031 0035 0039 0030 0030 0030 - .4.0.1.5.9.0.0.0
0x80: 0030 0030 0031 0035 0038 0026 0030	  - .0.0.1.5.8.&.0
I get:
CRC-32	   : 28FD18C3


If I do it via batch:
@ECHO OFF
ECHO.>result.txt
FOR %%A IN (
Arabic ASCII big-endian Big5 BMP ChineseAutoDetect
CNS-11643 CNS-11643-1986 cp1251 cp1252 cp437 cp850 cp932
EBCDIC EBCDIK EUC-J EUC-KR GB2312 Greek Hebrew HZ
ISO-2022-JP ISO-2022-KR ISOLatinCyrillic JapaneseAutoDetect
Java JIS_X0201 JIS_X_0208 KoreanAutoDetect Latin1 Latin2
Latin3 Latin4 Latin5 Latin6 little-endian Shift-JIS Thai
UCS2 Unicode11:big-endian Unicode11:BOM:big-endian
Unicode11:BOM:Java Unicode11:BOM:little-endian
Unicode11:BOM:UCS2 Unicode11:BOM:UTF7 Unicode11:BOM:UTF8
Unicode11:Java Unicode11:little-endian Unicode11:UCS2
Unicode11:UTF7 Unicode11:UTF8 Unicode20:BOM:Java
Unicode20:BOM:UTF7 Unicode20:BOM:UTF8 Unicode20:little-endian
Unicode20:UCS2 UTF7 UTF8
) DO (
ECHO %%A>>result.txt
uniconv ASCII originalascii.txt %%A test.txt
rehash -none -crc32 test.txt>>result.txt
)
with ALL available formats in UNICONV, I cannot find ANYTHING similar to "16f722a4" :w00t:

NOT even changing:
rehash -none -crc32 test.txt>>result.txt
into:
rehash test.txt>>result.txt
(i.e. using ALL hashing algorithms in rehash) :blink:

:unsure:

jaclaz

Edited by jaclaz, 01 August 2009 - 10:27 AM.


#97
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,723 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Try reading the code in post #90, that's the function, which produces the hash. I couldn't get a chance yet to attempt to understand it and create similar code in AutoIt for example.
From what I understood in this matter, that function is far from any famous CRC32 calculation algorithm, even different than RtlComputeCrc32 function, which ReactOS uses and is present in NTDLL.DLL too.

Attached is a program, made by someone else, while we tested hash calculation. 2k button uses Win 2K ParentID prefix hash calculation. It may become handy for someone.

Attached Files


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#98
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,675 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Try reading the code in post #90, that's the function, which produces the hash.


Yep. :)

What I was trying indirectly to confirm is that the above hash calculation is NOT a CRC32 one:

If there is anyone interested- here is the code in C, which calculates CRC32 hash:


jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users