ilko_t

How to install Windows from USB- WinSetupFromUSB with GUI

2,139 posts in this topic

As for the drive letter- did you use USB hard disk? Or USB stick which is seen as fixed by windows?

Did you install WinSetupFromUSB in a path without spaces or special characters in it?

Do you have migrate.inf in ~BT folder on the USB stick? Does it say about U: ?

As for the program files location- that's actually the last workaround left for fixing because of the removed unattended section.

Maybe adding a line to presetup.cmd like:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" /v ProgramFilesDir /t REG_SZ /d "D:\Program Files" /f
md "D:\Program Files"

Similar for CommonFilesDir if is desired.

This is not tested, just an idea. Not sure if Setup already placed during Text mode files for WMP or IE in c:\program files. Tests needed.

If presetup.cmd is too late to apply this changes, then we may have to use any means during text mode, setupreg.hiv, setupoem.inf or something like this. Not sure when this key is created during Text mode, it's not present in SETUPREG.HIV or HIVESFT.INF so must be dynamically created at some point.

Hope cdob is reading this, he is pretty good at this stuff. :ph34r::)

edit: BTW - quick and dirty workaround:

unattended section is remove because even with an empty section Text mode setup will attempt to install windows where ~BT and ~LS folders are.

But it will fail and return to partition selection screen if in that partition has less free space than the defined in txtsetup.sif.

Limited solution- put back unattended section, edit txtsetup.sif and set required free space more that you have free space on the partition on the USB disk/stick. Or create a dummy file, occupying so much space so it becomes less than the defined in txtsetup.sif:

fsutil.exe file createnew dummyfile.dum 1000000000

The latter is tested and works, but has limited usage.

Edited by ilko_t
0

Share this post


Link to post
Share on other sites

Thank you, ilko_t for quick reply

Does it make a difference to try command line tool USB_MultiBoot.cmd?

As for the drive letter- did you use USB hard disk? Or USB stick which is seen as fixed by windows?

Did you install WinSetupFromUSB in a path without spaces or special characters in it?

Do you have migrate.inf in ~BT folder on the USB stick? Does it say about U: ?

In d:\programs\WinSetupUSB

Source was prepared by latest Nlite.

I used 4GB A-Data USB stick, it's recognized as USB-HDD in BIOS,

I Also used AHCI text-mode drivers for ATI SB600 (hard drive)

migrate.inf form USB stick

HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\
5C,00,3F,00,3F,00,5C,00,53,00,54,00,4F,00,52,00,41,00,47,00,45,00,23,00,52,00,65,00,6D,00,6F,00,76,0
0,61,00,62,00,6C,00,65,00,4D,00,65,00,64,00,69,00,61,00,23,00,38,00,26,00,33,00,34,00,36,00,33,00,39
,
00,64,00,31,00,62,00,26,00,30,00,26,00,52,00,4D,00,23,00,7B,00,35,00,33,00,66,00,35,00,36,00,33,00,3
0
,00,64,00,2D,00,62,00,36,00,62,00,66,00,2D,00,31,00,31,00,64,00,30,00,2D,00,39,00,34,00,66,00,32,00,
2
D,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7D,00

fsutil.exe file createnew dummyfile.dum 1000000000

The latter is tested and works, but has limited usage.

That's what I was thinking just didn't know what program can create given length files.

Edited by Sergo
0

Share this post


Link to post
Share on other sites
Does it make a difference to try command line tool USB_MultiBoot.cmd?
Nope, the procedure is the same.

Do you use in Windows where you prepared the USB stick Hitachi microdrive filter driver or dummydisk.sys to make USB sticks seen as removable?

Can you compress and attach WinSetupFromUSB.log, it contains information how Windows saw the USB stick. You may find backed up log files in d:\programs\WinSetupUSB\backups\ directory, just renamed with date-time stamp, just pick the largest one if you have many.

Did you by any chance move the radio button USB disk type to fixed?

That's what I was thinking just didn't know what program can create given length files.
Mind you file size given to fsutil is in bytes. Edited by ilko_t
0

Share this post


Link to post
Share on other sites
Do you use in Windows where you prepared the USB stick Hitachi microdrive filter driver or dummydisk.sys to make USB sticks seen as removable?

No, I didn't, I think it's removable already, there is an icon 'safely remove..' in a tray.

I attached the log

2009/01/03 22:10:32- Found USB Physical Disk: USB 2.0 USB Flash Drive USB Device -- \\.\PHYSICALDRIVE2

2009/01/03 22:10:32- Found USB Disk Partition: Disk #2, Partition #0

2009/01/03 22:10:34- Found USB Logical Disk: M: File system: FAT32 Bootable: -1

(I had two partitions on it before, HP util made one FAT32)

Disk management console in XP sees it as 'Removable'

Did you by any chance move the radio button USB disk type to fixed?

No.

20090104_005254_log.cab

0

Share this post


Link to post
Share on other sites

Open regedit with the USB stick inserted and go to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Do you see multiple entries \DosDevices\R: where R: is USB stick drive letter?

If that's not the case- I am running out of clues why Setup ignored migrate.inf. :unsure:

Can you run the Setup on another computer just to the partition screen in Text mode, is the USB stick U:?

Did you copy paste here all contents of migrate.inf? Binary data must be on one whole line and a few other lines are missing in what you posted.

0

Share this post


Link to post
Share on other sites
Open regedit with the USB stick inserted and go to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Do you see multiple entries \DosDevices\R: where R: is USB stick drive letter?

I see \DosDevices\M: \DosDevices\N: having the same value

I guess N is a remnant of second partition of USB stick (which is useless for Windows, so I removed it)

Should I remove it.

If that's not the case- I am running out of clues why Setup ignored migrate.inf. :unsure:

Did you copy paste here all contents of migrate.inf? Binary data must be on one whole line and a few other lines are missing in what you posted.

here's migrate.inf from USB stick after I used it to install (if it matters)

[Version]
Signature = "$Windows NT$"

[Addreg]
HKLM,"SYSTEM\MountedDevices",,0x00000010
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1
HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\
5C,00,3F,00,3F,00,5C,00,53,00,54,00,4F,00,52,00,41,00,47,00,45,00,23,00,52,00,65,00,6D,00,6F,00,76,0
0,61,00,62,00,6C,00,65,00,4D,00,65,00,64,00,69,00,61,00,23,00,38,00,26,00,33,00,34,00,36,00,33,00,39
,
00,64,00,31,00,62,00,26,00,30,00,26,00,52,00,4D,00,23,00,7B,00,35,00,33,00,66,00,35,00,36,00,33,00,3
0
,00,64,00,2D,00,62,00,36,00,62,00,66,00,2D,00,31,00,31,00,64,00,30,00,2D,00,39,00,34,00,66,00,32,00,
2
D,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7D,00

[Strings]
;Handy macro substitutions non-localizable
REG_SZ = 0x00000000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
REG_MULTI_SZ = 0x00010000
REG_SZ_APPEND = 0x00010008
REG_EXPAND_SZ = 0x00020000

Thank you very much for your help,

I'll try to find another machine to run setup.

I assume before target drive selection is made, hard drive is not modified?

0

Share this post


Link to post
Share on other sites

Try another computer first, there are no disk changes if you do not continue setup. Use F3 or just power off the computer once you finish looking at the partition screen.

migrate.inf now looks fine, except the binary data is on multiple rows. Is it the board changing that, the program you open up migrate.inf with or an error when it was produced? Just make sure 5C,00,3F,00,3F,00,5C..... is one whole line. I use Notepad++ instead of Windows Notepad, has tens of great features. In this case view-->wrap unselected.

I guess N is a remnant of second partition of USB stick (which is useless for Windows, so I removed it)

Should I remove it.

Try deleting all partitions on the USB stick, use one whole partition and redo the preparation, this may matter.

BTW how did you partition it?

Edited by ilko_t
0

Share this post


Link to post
Share on other sites
Try another computer first, there are no disk changes if you do not continue setup. Use F3 or just power off the computer once you finish looking at the partition screen.

migrate.inf now looks fine, except the binary data is on multiple rows. Is it the board changing that, the program you open up migrate.inf with or an error when it was produced? Just make sure 5C,00,3F,00,3F,00,5C..... is one whole line. I use Notepad++ instead of Windows Notepad, has tens of great features. In this case view-->wrap unselected.

I atteched the file, it uses '\ ' to break the lines.

I use Far.

I guess N is a remnant of second partition of USB stick (which is useless for Windows, so I removed it)

Should I remove it.

Try deleting all partitions on the USB stick, use one whole partition and redo the preparation, this may matter.
BTW how did you partition it?

I used Acronis Director boot disk, but I assume when I ran HP format utility it makes a single partition anyway.

migrate.inf

0

Share this post


Link to post
Share on other sites

So file is fine and USB stick should have one single partition after HP tool.

Try on another computer.

0

Share this post


Link to post
Share on other sites

So I tried on two other computers (and BIOSes) HP ano Lenovo

same result, usb stick is detected as D: how it is supposed to according to MS Article ID: 234048 :

http://support.microsoft.com/kb/234048

===

Scan all fixed hard disks as they are enumerated, assign drive letters starting with any active primary partitions (if there is one), otherwise, scan the first primary partition on each drive. Assign next available letter starting with C:

====

So usb drive is a second active primary partition and C is taken, so it gets next letter.

Also tried to add gparted live gparted-live-0.4.1-2.iso

and UBCD4Win 3.22

- result boot menu get screwed up, no menu.lst just ubcd4win.lst, no mention of XP install.. :(

0

Share this post


Link to post
Share on other sites

Hmm:

http://support.microsoft.com/kb/234048

NOTE: If you perform an unattended upgrade, the Migrate.inf file is not created, and drive letter assignments are not retained if the answer file includes the "oempreinstall=yes" parameter.
Did you put back unattended section? Does it include oempreinstall=yes?
Also tried to add gparted live gparted-live-0.4.1-2.iso

and UBCD4Win 3.22

- result boot menu get screwed up, no menu.lst just ubcd4win.lst, no mention of XP install..

That version of GParted is not supported yet, on the screen it says from which to which versions are supported- 0.3.4-8 to 0.3.9-4. With the next version will add the newer GParted, or just replace it with PartedMagic, which includes GParted along with other tools.

No idea why menu.lst would disappear, I cannot recreate the problem, nor I see anywhere in the code when menu.lst could be deleted. Maybe if you tell me the exact steps to reproduce it I could fix it.

To fix it manually without starting from a scratch:

Copy menu.lst and default if not in USB root from \files\grub4dos\. Add the following lines to menu.lst:

title Windows XP/2000/2003 Setup- First and Second parts
root (hd0,0)
configfile /winsetup.lst
savedefault

title Start UBCD4Win
root (hd0,0)
configfile /ubcd4win.lst

Assuming winsetup.lst and ubcd4win.lst are still intact in root.

Edited by ilko_t
0

Share this post


Link to post
Share on other sites
Hmm:

http://support.microsoft.com/kb/234048

NOTE: If you perform an unattended upgrade, the Migrate.inf file is not created, and drive letter assignments are not retained if the answer file includes the "oempreinstall=yes" parameter.
Did you put back unattended section? Does it include oempreinstall=yes?

I tried both with oempreinstall=yes and no, and without unattended section at all.

Does it actually work for anybody, so USB drive is not D:?

As I undestand the installation simulates upgrade of existing Windows (migrate.inf) preserving old letter arrangement to avoid normal letter assignment?

0

Share this post


Link to post
Share on other sites

img1516ml1.th.jpg

migrate.inf:

[Version]
Signature = "$Windows NT$"

[Addreg]
HKLM,"SYSTEM\MountedDevices",,0x00000010
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1
HKLM,"SYSTEM\MountedDevices","\DosDevices\U:",0x00030001,\
5C,00,3F,00,3F,00,5C,00,53,00,54,00,4F,00,52,00,41,00,47,00,45,00,23,00,52,00,65,00,6D,00,6F,00,76,0
0,61,00,62,00,6C,00,65,00,4D,00,65,00,64,00,69,00,61,00,23,00,37,00,26,00,31,00,36,00,66,00,37,00,32
,
00,32,00,61,00,34,00,26,00,30,00,26,00,52,00,4D,00,23,00,7B,00,35,00,33,00,66,00,35,00,36,00,33,00,3
0
,00,64,00,2D,00,62,00,36,00,62,00,66,00,2D,00,31,00,31,00,64,00,30,00,2D,00,39,00,34,00,66,00,32,00,
2
D,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7D,00

[Strings]
;Handy macro substitutions non-localizable
REG_SZ = 0x00000000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
REG_MULTI_SZ = 0x00010000
REG_SZ_APPEND = 0x00010008
REG_EXPAND_SZ = 0x00020000

winnt.sif:

[data]
floppyless="1"
msdosinitiated="1"
winntupgrade="no"
win9xupgrade="no"
EulaComplete="1"

Quickly prepared USB stick with 'Copy setup boot files only' option checked.

0

Share this post


Link to post
Share on other sites

Tried different flash drive today

Before it was A-Data

A-Data

no luck

Since it was slow today tried Supertalent 8GB Pico-C

http://www.supertalent.com/products/stt_us...l.php?type=Pico

and magic happened! It became U: despite all the laws of Microsoft.

Irrelevant of presense of [unattended] section.

The only problem is a bug in Windows of determining free space

after WinSetupFromUSB is done, it shows ~7.3GB free, but max file size that can be created is ~5.5GB

so windows setup tries to install on USB drive, fortunately it sees it's fat32 and stops to offer to convert it to NTFS where

you can press 'ESC' and go go back to install partition selection.

Thank you for your help, ilko_t,

I'd never guessed that flash drive model plays a role.

0

Share this post


Link to post
Share on other sites

Wow, nice :)

The only ideas I have about not getting U: - A-Data USB stick has the removable bit flipped, but then why your windows was seeing it as removable, but not the Setup? Or it has abilities to emulate CD-ROM device, does it? Other than that I am clueless why this would happen.

As for the dummy file- did you try to create a second one?

Other way is to edit txtsetup.sif and space requirements.

Mind you- FAT32 could be VERY slow, NTFS outperforms it in times:

http://www.msfn.org/board/index.php?showtopic=125116

Anyway, glad you made it and thanks for reporting back :)

edit- BTW I wonder how you managed to place 5.5GB file in FAT32 partition. The maximum file size is 4GB - 1byte, maybe this explains the error you had. Try putting 2 dummy files.

Edited by ilko_t
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.