Jump to content

Problem installing XP from USB


Recommended Posts

I have a "working" USB installation from a 16 GB stick.

The installation is created using Bart PE by copying windows install files to the HD with

the /makelocalsource switch when calling Winnt32.exe.

Everything works fine untill it tryes to copy files when Winnt32.exe is running.

What happens here is a delay on 2-4 min were the USB is very active but no copying

is taking place after a few min the windows install starts to copy and everything is fine.

When I look at the USB stick after the winstallation has ended, I find this dir on it:

Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

This dir is btw totaly empty.

I have to mention that Im placing Documents and Settings on drive D: and it is placed

on D: when everything is done, but a little part og it just gets on the USB and that is why

there is this anoying delay before the copy of the windows installation to the HD.

I have this installation on DVD to and it works like a charm... just not from the USB

So why on earth does it have to copy that dir to USB?

Link to comment
Share on other sites


Still no answers... Maybe Im not expressing myself clearly enough...

Let me try in another way...

When I call: winnt32.exe from BartPE, one dir (Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys)

is copied to the USB stick before the windows installation is being copied to the HD (by winnt32.exe).

After the whole installation is done, everything is fine, except that tha USB now contains

the "Documents and Settings..." (look above) dir and it has delayed the installation unnessesery.

Why is that and how can I avoid this?

Link to comment
Share on other sites

So why on earth does it have to copy that dir to USB?
Why is that and how can I avoid this?

Just a guess, but you need to make the USB source "read only".

Try using this:

http://www.xabersoft.com/

http://www.xabersoft.com/freebies.html

http://www.xabersoft.com/download/usbwriteblocker.zip

Would it work in BartPE?

Cannot say. :unsure:

The only alternatives that come to my mind:

1) Use a RAMDISK loading of a .ISO for booting BartPE (needs files from Server2003 SP1 or R2)

2) Use EWF (needs files from Windows Embedded)

jaclaz

Link to comment
Share on other sites

@Jaclaz

I just found out that it is not the copying of windows that creates the dir "Documents and Settings..."

Making the drive write protected is a great idear. The utility that you link to unfortunetly uses a reg key

that does not exist in BartPE.

Maybe if I could ad this reg key when Bart is loading it would work, but I dont know what to edit to

include it there without making a new build and that would take a lot of work since I added a load of new

stuff to the USB.

Anyway Im totaly cluesless about what causes the delay now.

Edited by fusan
Link to comment
Share on other sites

Making the drive write protected is a great idear. The utility that you link to unfortunetly uses a reg key that does not exist in BartPE.
You may add a file \minint\system32\migrate.inf to BartPE.

Set StorageDevicePolicies at migrate.inf, compare http://www.msfn.org/board/-t61384.html&amp...st&p=638830

Anyway Im totaly cluesless about what causes the delay now.
How long does delay durate?

Are there another write/read acess to USB stick?

Did you integrated sysinternals filemon?

Do you use FAT32? This may delay file acess at USB stick.

Do you use fast USB hardware? Fast access time is more importand, fast transfer speed is next.

Link to comment
Share on other sites

@ cdob

I have created a migrate.inf and placed it in minint\system32 but when I check the registry, nothing is added.

This is my migrate.inf:

[Version]

Signature = "$Windows NT$"

[Addreg]

HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001

> How long does delay durate?

The delay can vary but usually takes 2-5 min

> Are there another write/read acess to USB stick?

Im not copying anything to the stick... whern I start Winnt32.exe .... and just before it gets to the part were

windows is to copy files/its installation to the HD this delay in starts and this is were the little flashlight is

flashing like crazy, but apperently nothing gets copied... really weird.

> Did you integrated sysinternals filemon?

No, does it work in Bart PE?

> Do you use FAT32? This may delay file acess at USB stick.

No Im using NTFS. The disk is wiped, partitioned and formated before the call to Winnt32.exe

> Do you use fast USB hardware? Fast access time is more importand, fast transfer speed is next.

Yes the USB stick is formated in Fat32... I dont think it is possible to make a bart PE boot in NTFS.

Link to comment
Share on other sites

This is my migrate.inf:

[Version]

Signature = "$Windows NT$"

[Addreg]

HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001

Try using, AS IN THE GIVEN EXAMPLE, ControlSet001, most probably when migrate.inf is parsed the "reg-link" between ControlSet001 and CurrentControlSet is not yet established.

CurrentControlSet is a "mirror" or either ControlSet001, or ControlSet002, .....ControlSetnnn, in other words when you open an offline Registry, there is NO CurrentControlSet, it is created on-the-fly by Windows when booting.

When windows is running, using CurrentControlSet is advised, but otherwise you need to use ControlSet001.

jaclaz

Link to comment
Share on other sites

@jaclaz

Thx for the correct syntax... but my problem is that Bart dont even read the migrate.inf

cus after I check the registry in Bart I dont se any changes at all.

Link to comment
Share on other sites

HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001
This is not a valid line: dword: dosn't work.

Try the previous named example. Don't change this for first testings.

Sysinerals filemon work at BartPE, if you use a proper plugin.

No idea about injecting files after. May work or fail.

A log should show cause of 2-5 min delay.

Yes the USB stick is formated in Fat32... I dont think it is possible to make a bart PE boot in NTFS.
BartPE boot from a NTFS USB stick.

However BIOS has to support USB NTFS boot first.

Link to comment
Share on other sites

I have now tried to use following syntax in migrate.inf:

HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect",0x10001,1

HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1

HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",0x10001,1

HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect"=DWORD:00000001

None of them work... when you guys mention "previous/given example" witch one do you refer to then?

Link to comment
Share on other sites

Still no answer on the migrate.inf syntax?

Well Ive used Filemon and stored the values in txt

files.

I used filemon under the delay and right after when

windows started to copy the installation files to the HD.

There was actually no difference on those two files except

what is shown in the attached picture.

And I have no clue what the diffence means... any good

ideas?

post-180077-1215585959_thumb.jpg

Link to comment
Share on other sites

Reference is here:

http://www.msfn.org/board/How-to-boot-inst...html&st=111

Yours should be:

[Version]
Signature = "$Windows NT$"

[Addreg]
;WriteProtect USB
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1

[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

or

[Version]
Signature = "$Windows NT$"

[Addreg]
;WriteProtect USB
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",0x00010001,1

Then, you have to BOTH add hiveOEM.inf AND add the entry for it in txtsetup.sif as explained in the referenced post.

jaclaz

Link to comment
Share on other sites

fusan@

I don't use a 16GB USB stick. Migrate.inf may fail.

Try editing registry:

run regedit, load file \minint\setupreg.hiv

Add writeprotect setting.

Which winnt32 command do you use?

Do you set syspart and tempdrive?

Link to comment
Share on other sites

First of all, Thx for the answers guys.

@jaclaz

I did not read the entire historical post but I must be very close by now.

But it didnt help yet though.

Ive added hiveoem.inf with the lines you suggested to minint\system32.

Then I created the entry: AddReg = hiveoem.inf,AddReg to txtsetup.sif

under [HiveInfs.Fresh] but Nada happend nothing is changed in the registry :blink:

@cdob

I oppened regedit in Bart, marked HKÉY_LOCAL_MACHINE and Loaded

setupreg.hiv.

Then I added the key: StorageDevicePolicies under SYSTEM\Controlset001\Control\.

Under StorageDevicePolicies I created a new value called WriteProtect as a DWORD.

the Data I added to the WriteProtect key was 00010001.

When I restarted the PC, it stopped right after the WindowsLogo Screen (just before it

starts to load the GUI) and it didnt go further from there.

This is positive, because now Im certan that somthing is actually happening and maybe

it is just the syntax that is wrng... but what part is could it be?

Im really sorry to bother you guys so much with all this, you have used enough of your

time but I really feel so close to solving this.

Link to comment
Share on other sites

Then I added the key: StorageDevicePolicies under SYSTEM\Controlset001\Control\.

Under StorageDevicePolicies I created a new value called WriteProtect as a DWORD.

the Data I added to the WriteProtect key was 00010001.

Maybe that's it, "00010001" is the "code" for DWORD, the actual value of the key in Registry must be either 0 (write protect disabled) or 1 (write protect enabled).

Some reference:

http://www.everythingusb.com/writeprotect_registry.html

http://www.accessdata.com/media/en_us/prin...otect.en_us.pdf

jaclaz

Edited by jaclaz
Link to comment
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.
×
×
  • Create New...