Help - Search - Members - Calendar
Full Version: Installing Vista/XP on USB disk
The CD Forum > The CD Forum > USB Booting
Pages: 1, 2
marv
I decided to make Vista/XP booting from the USB drive while it keeps all drivers untouched and properly signed.
This tutorial is based on Dietmar technique http://www.911cd.net/forums//index.php?showtopic=14181

All you need is one working installation of XP (or better) and my self made service (source included).

The only reason why Dietmar edited INF files is that system overwrites registry values for usbstor, usbehci, usbohci, usbuhci, usbhub start / group when new USB device is inserted (the unsigned driver warning dialog can show up if you modify driver) to the hub. System automaticaly replaces these registry values from driver (INF file).

The only purpose of my service USB_BOOT is to check for change in usb driver registry values and automatically fix it to the proper USB boot ones. Simply, system reads the registry values when booting, not the driver INF files. whistling.gif

Ok, this is how to install Vista/XP on your USB harddrive or stick.
1) Start installing on the USB drive and break after first reboot. Then boot working OS and connect your USB drive there.

If you use Vista/2008 you might get error message (system cannot be installed on USB hdd blabla). Easiest way is to connect your USB hdd to your PC over sata/ide, start installation, and after first reboot, place it to your external USB case again (continue step 2, and continue installation from USB drive!!!). The harder way is to start installation somewhere else and after first reboot copy complete image of partition to your usb drive / I didnt tried this one yet pinch.gif

2) In working OS simply run usb_boot.bat and enter your USB drive system32 path

3) Continue installation from USB drive.

4) If you get bluescreen after installation reboots, repeat step 2.

5) Done sorcerer.gif

! Update - group is now set as Boot Bus Extender, thanks cdob
Click to view attachment

---
I created new improved version of the service with configuration file!
usbbootwatcher.conf
CODE
[usbstor]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbehci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbohci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbuhci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbhub]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"


to see supported commands
CODE
usbbootwatcher.exe /?

to install service on current system (copy to system32 before). Remove old service first (sc stop "USBBOOT" and sc delete "USBBOOT")
CODE
usbbootwatcher.exe /install

uninstall
CODE
usbbootwatcher.exe /uninstall

to prepare registry for usb boot on another disk - update registry (as set in .conf file) and create service USBBOOT
CODE
usbbootwatcher.exe /prepare e:\windows\system32


! 5.1.2009 fixed issue while reading registry file
jaclaz
Could you expand of what exactly USB_BOOT.EXE does?

Which keys changes, with what data, etc....

Would you think possible to use migrate.inf or edit SETUPREG.HIV to avoid a couple of steps? unsure.gif

jaclaz
marv
QUOTE (jaclaz @ Dec 29 2008, 07:41 AM) *
Could you expand of what exactly USB_BOOT.EXE does?

Which keys changes, with what data, etc....

Would you think possible to use migrate.inf or edit SETUPREG.HIV to avoid a couple of steps? unsure.gif

jaclaz


usb_boot.exe is service and it check for changes in registry

for all of these
SYSTEM\CurrentControlSet\Services\usbstor
SYSTEM\CurrentControlSet\Services\usbehci
SYSTEM\CurrentControlSet\Services\usbohci
SYSTEM\CurrentControlSet\Services\usbuhci
SYSTEM\CurrentControlSet\Services\usbhub
it sets Start to 0 and Group to System Reserved when changed to diffrent

Im not sure if its possible to start service while setup, but I try later and let you know
jaclaz
I see. smile.gif

VERY good idea/approach! thumbsup.gif

If you are positive that the data comes from .INF files, what if one changes the .INF themselves? unsure.gif

Definitely it is possible to add usb_boot.exe to the build in TXTSETUP.SIF, and there is definitely some way to start it.

In the archive posted there is NO usb_boot.bat. w00t.gif

jaclaz
cdob
Thanks for this service. This come in handy.

QUOTE (marv @ Dec 29 2008, 03:52 PM) *
it sets Start to 0 and Group to System Reserved when changed to diffrent
Why do you set all USB services to System Reserved?

Compare HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\List
System Reserved is real early. There are timing errors at some machines.

I'm used "Boot Bus Extender" for usb?hci.
And "System Bus Extender" for usbhub and usbstor.

boot_usb_start0_CurrentControlSet.reg
CODE
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbohci]
"Start"=dword:00000000
"Group"="Boot Bus Extender"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbuhci]
"Start"=dword:00000000
"Group"="Boot Bus Extender"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbehci]
"Start"=dword:00000000
"Group"="Boot Bus Extender"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbhub]
"Start"=dword:00000000
"Group"="System Bus Extender"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor]
"Start"=dword:00000000
"Group"="System Bus Extender"


QUOTE
Im not sure if its possible to start service while setup, but I try later and let you know

Import usb_boot.reg to setupreg.hiv.

I can't test fully myself:
I'm getting "(system cannot be installed on USB hdd blabla)".
I install windows at VMware Player and copy files to USB flash.
marv
QUOTE (jaclaz @ Dec 29 2008, 10:30 AM) *
I see. smile.gif

VERY good idea/approach! thumbsup.gif

If you are positive that the data comes from .INF files, what if one changes the .INF themselves? unsure.gif

Definitely it is possible to add usb_boot.exe to the build in TXTSETUP.SIF, and there is definitely some way to start it.

In the archive posted there is NO usb_boot.bat. w00t.gif

jaclaz


if you change .INF files, digital signature wont be valid anymore bounce.gif
marv
QUOTE (cdob @ Dec 29 2008, 10:34 AM) *
Thanks for this service. This come in handy.

QUOTE (marv @ Dec 29 2008, 03:52 PM) *
it sets Start to 0 and Group to System Reserved when changed to diffrent
Why do you set all USB services to System Reserved?

Compare HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\List
System Reserved is real early. There are timing errors at some machines.

I'm used "Boot Bus Extender" for usb?hci.
And "System Bus Extender" for usbhub and usbstor.
...

Thank for your reply. You are right, well, I used System Reserved wihout problems. I will fix to Boot Bus Extender
corsair
Excellent work on getting a monitoring service going!
Looks like a simpler version of the usboot.org I like it.

I have 3 statements/questions:

1) I only see services modification in your bat file, assuming exe only monitors changes to these services correct?
2) Do you not need usb device entry for the OS to actually boot your USB disk? It cannot add it on the fly as it is the OS?
This will work for vista, not sure about xp seeing the device even after drivers being loaded.
Reading variation of tutorials, seems like you need the USB drive device registered in xp before xp will boot from it.
3) In my workings I have seen HKLM\system\control*\services\USB*\Tag Dword playing a role in usb drive detection.
If those are set in a particular order #, boot bus extender or system reserved start flags dont load the USB drive device.
(drivers load, drive doesnt load to the OS showing BSOD)
marv
1) usb_boot.exe is service which fixes start and group for USB drivers, which is changed (from INF values, but this method doesnt touch INF files to keep digital signature) for example when you insert new USB device to hub, drivers update and so.
2) Yes, you have to force system (XP or Vista) to load usb drivers when booting / nt loader reads stuff from registry, as set in active ControlSetXXX, in running system - CurrentControlSet.
3) Hmm, such things are hard to test and never happened to me.
ktp
Excellent! I will try this under Vista. I assume that the install batch file must be run with administrator rights (to be documented in the readme).
2kx2
I tried this and when I ran the bat file it displayed the correct drive for where the install was located. It completed the backup of the registry, then it ran into an error and displayed that access is denied over and over again.

Any ideas on why this is failing. It says that the current control set is currentcontrol000 before it begins to error.

I have a version running with the inf change and it works fine but it gets annoying having to accept every time I insert a usb device and have to click continue anyway. If this will resolve this issue while still letting me use the bootable usb I would really like to use it.

Thanks in advance.
marv
QUOTE (2kx2 @ Jan 3 2009, 03:50 AM) *
I tried this and when I ran the bat file it displayed the correct drive for where the install was located. It completed the backup of the registry, then it ran into an error and displayed that access is denied over and over again.

Any ideas on why this is failing. It says that the current control set is currentcontrol000 before it begins to error.

I have a version running with the inf change and it works fine but it gets annoying having to accept every time I insert a usb device and have to click continue anyway. If this will resolve this issue while still letting me use the bootable usb I would really like to use it.

Thanks in advance.


did you run usb_boot.bat on your USB windows? If you want to update your current USB windows, simply create service for USB_BOOT.exe (copy it to system32)
Install with these commands:
CODE
sc create "USBBOOT" binpath= C:\WINDOWS\System32\usb_boot.exe start= auto
sc start "USBBOOT"


and restore your .inf files from original CD. Should works.
2kx2
Marv, I haven't tried it on my current XP USB.

Where do I need to do the following and how do I do it?

CODE
sc create "USBBOOT" binpath= C:\WINDOWS\System32\usb_boot.exe start= auto
sc start "USBBOOT"



I didn't know if I could simply copy the usb_boot.exe to system32 and run the executable.

Thanks
cdob
QUOTE (2kx2 @ Jan 3 2009, 08:50 AM) *
Marv, I haven't tried it on my current XP USB.

Where do I need to do the following and how do I do it?

Boot current XP USB.

Open a command prompt.
Copy and paste first line, press enter.
Copy and paste second line, press enter.

Copy file usb_boot.exe to system32 too.
2kx2
When I enter the sc start "USBBOOT" I get an error

[SC] StartService: OpenService FAILED 1060:

The specified service dows not exist as an installed service.
cdob
Did you copy file usb_boot.exe first?

Did first line process without error?
Just reboot. Open taks manager: is usb_boot loaded?
2kx2
QUOTE (cdob @ Jan 3 2009, 06:10 PM) *
Did you copy file usb_boot.exe first?

Did first line process without error?
Just reboot. Open taks manager: is usb_boot loaded?


Copied it over. When I ran the first line it gave me the options and syntax options. usb_boot isn't running either.
nuMe
If you cut & pasted the lines as posted I doubt they will work. They need to be

CODE
sc create "USBBOOT" binpath=C:\WINDOWS\System32\usb_boot.exe start=auto
sc start "USBBOOT"

not

CODE
sc create "USBBOOT" binpath= C:\WINDOWS\System32\usb_boot.exe start= auto
sc start "USBBOOT"


No spaces after the "=" signs.
2kx2
If this does work how do I replace the inf files with the correct ones from the windows xp cd?
marv
there must be space " " after "=" signs. see "sc create /?" for more informations.
If you would like to remove service and install new one, simply
CODE
sc stop "USBBOOT"
sc delete "USBBOOT"

and remove usb_boot.exe.
marv
QUOTE (2kx2 @ Jan 3 2009, 07:58 PM) *
If this does work how do I replace the inf files with the correct ones from the windows xp cd?


1) Locate these files on your cd: USB.IN_, USBPORT.IN_, USBSTOR.IN_
2) Unpack with "cabarc x" so you get USB.inf, USBPORT.inf and USBSTOR.inf
3) Copy them to c:\windows\inf and confirm replace
done.
2kx2
QUOTE (marv @ Jan 4 2009, 04:00 PM) *
QUOTE (nuMe @ Jan 3 2009, 07:53 PM) *
If you cut & pasted the lines as posted I doubt they will work. They need to be

CODE
sc create "USBBOOT" binpath=C:\WINDOWS\System32\usb_boot.exe start=auto
sc start "USBBOOT"

not

CODE
sc create "USBBOOT" binpath= C:\WINDOWS\System32\usb_boot.exe start= auto
sc start "USBBOOT"


No spaces after the "=" signs.


there must be space " " after "=" signs. see "sc create /?" for more informations.
If you would like to remove service and install new one, simply
CODE
sc stop "USBBOOT"
sc delete "USBBOOT"

and remove usb_boot.exe.


I haven't tried it yet without the spaces but it didn't work with the spaces. I think there is something wrong with the syntax if the spaces have to be there.
cdob
QUOTE (2kx2 @ Jan 4 2009, 10:32 PM) *
I think there is something wrong with the syntax if the spaces have to be there.
First line with spaces works pretty fine. This syntay is correct.
Maybe there is another reason.

Try another approach: usb_boot.bat edited to CurrentControlset.

Boot USB XP and run USB_BOOT_Service_CurrentControlset.cmd.
CODE
set Service_USBBOOT=HKLM\SYSTEM\CurrentControlSet\Services\USBBOOT
reg add %Service_USBBOOT% /v Type /t REG_DWORD /d 10 /f
reg add %Service_USBBOOT% /v Start /t REG_DWORD /d 2 /f
reg add %Service_USBBOOT% /v ErrorControl /t REG_DWORD /d 1 /f
reg add %Service_USBBOOT% /v ImagePath /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\usb_boot.exe" /f
reg add %Service_USBBOOT% /v ObjectName /t REG_SZ /d "LocalSystem" /f

Copy usb_boot.exe to system32.
Reboot. Open task manager, is usb_boot loaded?
Replace usb .inf files next.
cdob
QUOTE (marv @ Dec 29 2008, 01:20 PM) *
I created new improved version of the service with configuration file!

Great, you solve not asked questions.

Windows XP:
I like the configuration file to set some service to manual start, e.g. intelppm.
A adjusted CriticalDeviceDatabase does start service at appropiate hardware only.
Read: intelppm.sys is started at Intel CPU, but not at AMD CPU.

UsbBootWatcher.conf
CODE
[usbehci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbohci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbuhci]
Start@REG_DWORD=0
Group@REG_SZ="Boot Bus Extender"
[usbhub]
Start@REG_DWORD=0
Group@REG_SZ="System Bus Extender"
[usbstor]
Start@REG_DWORD=0
Group@REG_SZ="System Bus Extender"
[processor]
Start@REG_DWORD=3
[intelppm]
Start@REG_DWORD=3
[AmdK6]
Start@REG_DWORD=3
[AmdK7]
Start@REG_DWORD=3
[AmdK8]
Start@REG_DWORD=3
[agp440]
Start@REG_DWORD=3
jaclaz
@marv
Possibly a "stupid suggestion", but can we have the app named USBwatch.exe and the .conf file named USBwatch.ini ?
(or any similar 8.3 compliant names?)

I have no idea when and if this may be useful unsure.gif, but this would allow (for example) good ol' DOS copying and/or ISO 9660 compatibility and/or TXTSETUP.SIF compatibility without need fopr renaming or LFN.

VERY good work, BTW! thumbsup.gif

jaclaz
marv
good idea, Ill rename by default
storm_breaker
Hi !
I need some help.I try everything what is written from marv but i still have a problem with the loadings of windows.What i have done so far is I installed the windows XP strate to the laptop (ACER 9810) and then install the usb watch and the usb boot and the service and the setting according to the post above but still when i try to start the XP from the USB HDD does not run .Im getting the BSOD error in the midle of Windows XP logo.when i try to do it with F8, I see that the USBBOOT its loading and all the rest usb........sys are loading but still cant manage to see the Desktop.So if you have any ideas or questions pls ask. Thanks in advance.
storm_breaker
QUOTE (2kx2 @ Jan 4 2009, 10:32 PM) *
QUOTE (marv @ Jan 4 2009, 04:00 PM) *
QUOTE (nuMe @ Jan 3 2009, 07:53 PM) *
If you cut & pasted the lines as posted I doubt they will work. They need to be

CODE
sc create "USBBOOT" binpath=C:\WINDOWS\System32\usb_boot.exe start=auto
sc start "USBBOOT"

not

CODE
sc create "USBBOOT" binpath= C:\WINDOWS\System32\usb_boot.exe start= auto
sc start "USBBOOT"


No spaces after the "=" signs.


there must be space " " after "=" signs. see "sc create /?" for more informations.
If you would like to remove service and install new one, simply
CODE
sc stop "USBBOOT"
sc delete "USBBOOT"

and remove usb_boot.exe.


I haven't tried it yet without the spaces but it didn't work with the spaces. I think there is something wrong with the syntax if the spaces have to be there.


I manage to do it without the star=auto -the auto i done it manualy from Run-> services.msc
sc.exe create "USBBOOT" binpath= "C:\WINDOWS\System32\usb_boot.exe"

more info here
bilou_gateux
QUOTE (jaclaz @ Jan 14 2009, 12:01 AM) *
@marv
Possibly a "stupid suggestion", but can we have the app named USBwatch.exe and the .conf file named USBwatch.ini ?
(or any similar 8.3 compliant names?)
jaclaz


I second that.

Use also UsbWatch for [service name] and keep the full name with spaces in it for DisplayName data value

CODE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\system.sav\ControlSet001\Services\UsbWatch]
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,55,\
  00,73,00,62,00,42,00,6f,00,6f,00,74,00,57,00,61,00,74,00,63,00,68,00,65,00,\
  72,00,2e,00,65,00,78,00,65,00,00,00
"ObjectName"=hex(2):4c,00,6f,00,63,00,61,00,6c,00,53,00,79,00,73,00,74,00,65,\
  00,6d,00,00,00
"Start"=dword:00000002
"Type"=dword:0000000a
"ErrorControl"=dword:00000001
"DisplayName"="Usb Boot Watcher Service"


None of Windows XP services uses names with spaces in it.
jaclaz
QUOTE (marv @ Dec 29 2008, 04:38 PM) *
if you change .INF files, digital signature wont be valid anymore bounce.gif


JFYI:
http://www.911cd.net/forums//index.php?sho...4181&st=758
up to:
http://www.911cd.net/forums//index.php?sho...4181&st=776
and with some more info up to:
http://www.911cd.net/forums//index.php?sho...4181&st=859

Maybe someone with the "right" kind of knowledge could put together the info and "finalize" them....


jaclaz
Largo Redeye
QUOTE (2kx2 @ Jan 3 2009, 08:50 AM) *
I tried this and when I ran the bat file it displayed the correct drive for where the install was located. It completed the backup of the registry, then it ran into an error and displayed that access is denied over and over again.


Hi, I have exactly the same problem right now and wonder if someone here could give me a hint how to fix it.

Here is what I did:

I formated a USB stick in FAT32 (size 2 GB, boots fine, tested it with DOS files) and plugged it into my computer, booted from a Windows XP install CD and I did select the USB stick as the drive to install Windows. The the installer started the installation without any problems so far and copied the installation files to the USB stick.
Then when reaching 100% the computer rebooted and as said in the manual I didn't continue the installation here and booted the already installed Windows on my computer from the hard drive (also Windows XP).
The drive letter from the USB stick here is G: and so I ran the BAT and wrote:

CODE
g:/Windows


However like 2kx2 I also get a long list of "access denied" messages and also a syntax error at the beginning when it makes a backup of the registry.

Did anyone else had the same problem and found out how to fix it?


Thanks a lot and greetings!

Largo
jaclaz
QUOTE (Largo Redeye @ Feb 8 2009, 05:49 PM) *
I formated a USB stick in FAT32 (size 2 GB, boots fine, tested it with DOS files)


Probably unrelated unsure.gif, but testing bootability with DOS on USB FAT32 volumes is NOT a definitive test.

See these:
http://www.911cd.net/forums//index.php?showtopic=22016
http://www.msfn.org/board/index.php?showtopic=119963
http://www.911cd.net/forums//index.php?showtopic=21955

Re-create the DOS bootable drive, then use bootpart to change the bootsector code, add to the root NTLDR, NTDETECT.COM and a BOOT.INI with at least two entries.

If you get to the BOOT.INI choices, THEN the drive is bootable for NT.

Or use something else to format/partition the stick, like fuwi's batch:
http://www.911cd.net/forums//index.php?showtopic=21702

or my "indirect" image driven method:
http://www.boot-land.net/forums/index.php?showtopic=3191
http://www.boot-land.net/forums/index.php?showtopic=5000

jaclaz
Largo Redeye
Thanks for the reply, I did test my USB stick with those methods now and it seems that it is really bootable for NT, right now I am running a memory test after testing the stick with fuwi's batch wink.gif

Now I just hope there is a solution for my problem with the usb_boot.bat from marv whistling.gif
I was really happy when I read about that as I was hoping that this could finally be a way for me to get XP booting from a USB stick. I tried that a few times over the last two years by following these long tutorials and so far always failed sweatingbullets.gif
AlexData
I also get the ACCESS DENIED errors...

I formatted a HDD using XP INSTALL CD, and let the XP INSTALL CD copy all the files to the HDD
Then XP INSTALL CD reboots...
Now i boot into my normal XP, and I run the USB_BOOT.BAT and point it to my USB COPY of the partially installed XP

then i enter Y:\windows (as my USB is Y:)

Then the USB_BOOT.BAT does the following...

a. check that the directory is valid - [OK!]
b. make backup of reg hive system - [OK!]
c. load hive system on usb - [OK!]
d. read cpu architecture - OUTPUT NAME IS BLANK - [MAYBE OK?!?]
e. comes to the spot where it is supposed to "write to the registry" and gets the ACCESS DENIED - [NOT OK!!]
f. after failing all the REG WRITE attempts, it tries to copy the file usb_boot.exe to the USB
since the file in the ZIP is named USBWATCHER.EXE that failed too... renamed the file, and then that part went OK...

g. downloaded another ZIP named Tutorial_31_12_2008.zip and in that the usb_boot.exe was named correct...

PS; ALSO... "reg load HKU\USBBOOT %TARGET_DIRECTORY%\config\system" failed to load/open...
but when I renamed all "HKU\" to "HKLM\" then it loaded/opened.... strange?!?!

Still... MARV, can you look over your .BAT file again, and upload a NEW .zip file (edit your first post, and perhaps make a new post with it too)

Cause there seems to be something strange about your script, since some get it to work, while others dont...

Is this script written for no-SP, SP1, or SP2 ??

I ask this because when I mount the SYSTEM hive and go to "\HKEY_LOCAL_MACHINE\USBBOOT\ControlSet001\Control\Session Manager\Enviroment" and look for the PROCESSOR_ARCHITECTURE then I cannot find it in my SYSTEM hive for SP1

So since it is not there... it means that maybe your SYSTEM hive is different... ex: SP2...

But I will try to add the REG EDITS manually... reading the values from your BAT file...
and then maybe POST a .REG file for those edits here... so that LARGO REDEYE can apply those after manually mounting the SYSTEM hive as USBBOOT in regedit.... and then I will manually copy the USB_BOOT.EXE to system32 directory....

And post an update on what happens then!!

*UPDATE 1*
The SYSTEM hive from the USB partial XP install (copy from when XP install has copied the files, and rebooted) is not WRITEABLE at all
I copied it to my normal XP, loaded it in REGEDIT and no matter what, I cannot WRITE anything to it...
Then I unloaded it from the registry, and did an ATTRIB -A -R -S -H and also checked the NTFS PERMISSIONS on that file, all to see that I had READ/WRITE permissions to the file, and so I had... also right-clicked the file to doublecheck for "write protected" but its NOT...

Still, there is NO way that the REGEDIT lets me WRITE to that SYSTEM hive... and thus, it is not at all strange that your BAT also does not write to it... Still, your BAT is loooking for the PROCESSOR_ARCHITECTURE, and that value is not to be found at the place your bat is looking for it...

Hmm... any idea's anyone?
cdob
QUOTE (AlexData)
I run the USB_BOOT.BAT

USB_BOOT.BAT is outdated.

Use usbbootwatcher.exe instead.
AlexData
QUOTE (cdob @ Feb 10 2009, 06:30 PM) *
QUOTE (AlexData)
I run the USB_BOOT.BAT

USB_BOOT.BAT is outdated.

Use usbbootwatcher.exe instead.



So....

Can you point me to the current downloadable "usbbootwatcher.exe" ??

And how exaclty do I proceed with the following:

a. let XP cd format C: and copy the files to C:\ (shutdown when 100% copied)
b. open working XP, copy the C:\ (all files) to USB (y:)
c. usbbootwatcher.exe /prepare Y:\windows\system32
d. OUTPUT IS THIS:
CODE
D:\>usbbootwatcher.exe /prepare y:\WINDOWS\system32

Copy from D:\UsbBootWatcher.exe
To y:\WINDOWS\system32\UsbBootWatcher.exe

Copy from UsbBootWatcher.conf
To y:\WINDOWS\system32\UsbBootWatcher.conf

Copy from y:\WINDOWS\system32\config\system
To y:\WINDOWS\system32\config\system.backup20090210185441

Registry hive loaded HKLM\USBBOOT
Target control set ControlSet000
Updating USBBOOT\ControlSet000\Services\usbstor
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbehci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbohci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbuhci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbhub
Warning: No such registry key!
Creating service USBBOOT\ControlSet000\Services\Usb Boot Watcher Service
Exception: Cannot create service


so how am I to proceed? PS: the ControlSet000 should be ControlSet001 (as I have no CS000 in my SYSTEM hive)
so why it finds CS000 instead of CS001 i dont know...
Largo Redeye
I also experimented today again a little more with the usbbootwatcher.exe and get exactly the same error:

CODE
D:\Desktop\UsbBootWatcher\x86>UsbBootWatcher.exe /prepare g:\WINDOWS\system32
Copy from D:\Desktop\UsbBootWatcher\x86\UsbBootWatcher.exe
To g:\WINDOWS\system32\UsbBootWatcher.exe

Copy from UsbBootWatcher.conf
To g:\WINDOWS\system32\UsbBootWatcher.conf

Copy from g:\WINDOWS\system32\config\system
To g:\WINDOWS\system32\config\system.backup20090213163914

Registry hive loaded HKLM\USBBOOT
Target control set ControlSet000
Updating USBBOOT\ControlSet000\Services\usbstor
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbehci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbohci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbuhci
Warning: No such registry key!
Updating USBBOOT\ControlSet000\Services\usbhub
Warning: No such registry key!
Creating service USBBOOT\ControlSet000\Services\Usb Boot Watcher Service
Exception: Cannot create service


I did everything as before, I started the installation from the Windows CD and selected the USB stick as the drive to install on and after the first reboot (when the installer finished copying files on the stick) I interrupted the installation and booted into my running system.
Here the USB stick is drive G: and so I entered "UsbBootWatcher.exe /prepare g:\WINDOWS\system32".

So please, can't anyone tell me, what I am missing here, why do I get these errors? I am using a German Windows XP SP2, could here be the misstake? Does this work only with SP1 maybe or not with every language version? Or what else could I try, please help sad.gif
cdob
QUOTE (Largo Redeye @ Feb 13 2009, 05:48 PM) *
I started the installation from the Windows CD and selected the USB stick as the drive to install on and after the first reboot (when the installer finished copying files on the stick) I interrupted the installation and booted into my running system.

I am using a German Windows XP SP2, could here be the misstake?

There are several difficulties after XP first reboot:
system registry use system permissions: a admin can't read registry.
UsbBootWatcher dosn't have permission to read and change registry.
XP is not USB boot friendly, there are addional changes necessary.
Some driver files maybe missing.

There is a experimental batch attached.

Launch
CODE
usb_xp_init.cmd g:\WINDOWS\system32

Copy usb_xp_init.cmd to UsbBootWatcher. Use files
QUOTE
UsbBootWatcher\usb_xp_init.cmd
UsbBootWatcher\amd64\UsbBootWatcher.conf
UsbBootWatcher\amd64\UsbBootWatcher.exe
UsbBootWatcher\x86\UsbBootWatcher.conf
UsbBootWatcher\x86\UsbBootWatcher.exe
amd64 not tested.

Some strange machines may require changed files, e.g. Dietmar's ntdetect.com.
http://www.911cd.net/forums//index.php?s=&...st&p=153804
Or USB drivers from XP SP1, SP3, XP Embedded or 2003.
Plain XP SP2 files does work at a friendly machine.
Largo Redeye
QUOTE (cdob @ Feb 17 2009, 09:25 PM) *
There is a experimental batch: usb_xp_init.cmd.


Thanks a lot, it seems that this batch really did the trick thumbsup.gif

I installed Windows XP again from the install CD to the USB stick (German, SP2) and interrupted the installation. Then I ran the batch like you said and it seemed to run without any problems, at least I saw no error messages.
Then I rebooted the computer and tried to boot from the USB stick and finally I could continue the installation, no need for that modified ntdetct.com file or additional drivers smile.gif

I finished it now and tried a few reboots and disabled the pagefile what was recommended in all tutorials, are there any other precautions I should know about? And what could cause Windows not being able to boot from the USB stick anymore, is Windows Update safe for example?

Thanks again, finally after all these years it did work biggrin.gif
smudger
Feeling a bit out of my depth here but wondered if anyone may be able to help.

In this post marv says
"The harder way is to start installation somewhere else and after first reboot copy complete image of partition to your usb drive / I didnt tried this one yet"

In this post cdob says
"I'm getting "(system cannot be installed on USB hdd blabla)".
I install windows at VMware Player and copy files to USB flash."

BACKGROUND

I have downloaded W7-RC7100 and want to run it from my 64Gb USB flash drive (I am currently running XP on a laptop, am out of disk space, and don't want to mess with my existing config.)

I successfully made my USB drive bootable using the approach described here.

I then tried installing Win7 directly from & to USB but got same as cdob - even after trying hitachi microfilter and lexar bootit flip bit approaches - wouldn't allow me to install to USB drive.

So now I've created a Win7 VM with Portable Virtual Box, started the installation (with a 20Gb VHD) and broke off as advised, at first reboot.

Have copied files from Win7-VM partial install to USB stick with ubuntu file manager from ubuntu live cd. However, had error saying:
There was an error while copying the file into /media/disk-1/Windows/System32/config/systemprofile/AppData/Loca1Low/M1cro$oft/Cryptn3tURLCach3/Content
so I had to skip it.

I've also prepared usbwatcher, as advised, on the USB drive.

ISSUE

My USB drive is no longer bootable.
I've tried with (bootmgr + boot folder + bootsect.bak) from the original working bootable USB setup and also copied set from the VM/VHD install.
With the set copied from VM/VHD install, I get the Windows Boot Manager error:
can't boot - most likely due to a recent change in hardware or software
there is a problem with C:/windows/system32/winloader.exe - file is missing or has become corrupt
insert windows installation CD and restart


The file /windows/system32/winloader.exe does exist on the flash drive.

Is it because boot config copied from VM/VHD is hard-coded to C: drive and Win7 loader doesn't default USB key to C:?

QUESTION
Can anyone advise of an easy, reliable method for getting the files off the VM's drive and on to my USB key while keeping / making the USB drive bootable? Do I have to do a complete disk image? If so, how do I get around the multiple partition - believe I can only put 1 partition on the USB key. Or is there another way of copying the files?

All help much appreciated.
jaclaz
QUOTE (smudger @ Aug 10 2009, 01:33 PM) *
ISSUE

My USB drive is no longer bootable.
I've tried with (bootmgr + boot folder + bootsect.bak) from the original working bootable USB setup and also copied set from the VM/VHD install.
With the set copied from VM/VHD install, I get the Windows Boot Manager error:
can't boot - most likely due to a recent change in hardware or software
there is a problem with C:/windows/system32/winloader.exe - file is missing or has become corrupt
insert windows installation CD and restart


The file /windows/system32/winloader.exe does exist on the flash drive.

Is it because boot config copied from VM/VHD is hard-coded to C: drive and Win7 loader doesn't default USB key to C:?

QUESTION
Can anyone advise of an easy, reliable method for getting the files off the VM's drive and on to my USB key while keeping / making the USB drive bootable? Do I have to do a complete disk image? If so, how do I get around the multiple partition - believe I can only put 1 partition on the USB key. Or is there another way of copying the files?

All help much appreciated.[/font][/size]


MBR and bootsector have NOTHING to do with "later" errors like the ones involving BOOTMGR, BCD and winloader.exe.

Try using this:
http://www.boot-land.net/forums/index.php?...ic=8480&hl=

though really cannot say if it will work.

OR use QEMU as a VM with the stick attached to it as \\.\PHYSICALDRIVEn, see here:

http://www.boot-land.net/forums/index.php?showtopic=8581

I am suggesting QEMU as, though a bit slower than other VM's has the most "standard" virtual hardware (and drivers), for the latest build, see here:
http://www.boot-land.net/forums/index.php?showtopic=7650

jaclaz
cdob
QUOTE (smudger @ Aug 10 2009, 12:33 PM) *
There was an error while copying the file into /media/disk-1/Windows/System32/config/systemprofile/AppData/Loca1Low/M1cro$oft/Cryptn3tURLCach3/Content[/indent]
Did you edited the error message?

QUOTE
there is a problem with C:/windows/system32/winloader.exe - file is missing
Adjust the bcd store, set boot to device and osdevice.
http://www.multibooters.co.uk/cloning.html
smudger
QUOTE (cdob @ Aug 10 2009, 08:26 AM) *
Did you edited the error message?

Yes - I edited the error message.

QUOTE (cdob @ Aug 10 2009, 08:26 AM) *
Adjust the bcd store, set boot to device and osdevice.
http://www.multibooters.co.uk/cloning.html


Thanks very much jaclaz & cdob- the bcd store change almost did the trick! I followed instructions as per link (booted Win7 VM, attached USB drive to VM and did bcdedit) and my (non-VM) machine booted from the USB drive and continued the Win7 installation process.

However, it took a long time to Install Devices - circa 45 mins - which seemed much longer than same step when installing on to VM, when USB drive was the host for the virtual drive. Not sure why this is - maybe because I didn't turn windows page file off on new W7 USB install, or maybe because driver that gets loaded for USB when used with the VM is better than the default one that gets used when booting & installing directly from USB? (Using Jetflash v220 64Gb flash drive.)

Anyways, after Install Devices & Apply System Settings, Win7 install reboots again but this time it won't restart & I get the Windows Recovery Screen. Tried following options:
  • start windows normally
  • start windows in safe mode with command prompt
  • start windows in last known good configuration
but no good - still won't boot now from USB key, even after doing so initially. (Thankfully still boots XP from my HDD and thought it wasn't going to for a while - guess it was the memtest taking the time!)

So, I'm at dead-end again.

Does anyone have any ideas where to go from here?

If turning the page file off may do the trick, how do I do this from another OS, now that I can't get the USB install to boot (and haven't had front end access to it yet.)

Thanks again.
smudger
QUOTE (marv @ Dec 29 2008, 07:20 AM) *
:
2) In working OS simply run usb_boot.bat and enter your USB drive system32 path

3) Continue installation from USB drive.

4) If you get bluescreen after installation reboots, repeat step 2.

5) Done sorcerer.gif
:


Apologies all - re-read this, re-ran usbbootwatcher.exe and that did the trick - I can now boot Win7 successfully from my USB stick! happy71.gif

Have successfully managed to reboot it as well and it hasn't frozen or anything - reboots fine.

Haven't tried attaching any other USB devices yet when running from the USB stick but guess it should be fine.

I have to say though, my main reason for wanting to boot & run from USB was that I thought it would perform better running native than in a VM on host XP. Admittedly I've only just done the install so haven't really used the native USB install yet but I have to say, I'm not convinced it's much, if any any, faster than running as a VM - even when the USB drive hosts the VM's virtual drive!

(And by the way, Win7 had automatically decided a page file wasn't appropriate for the USB install (I guess it must do some sort of speed test to determine).)

Thanks to all who have contributed to the process.
jaclaz
QUOTE (smudger @ Aug 10 2009, 09:11 PM) *
Apologies all - re-read this, re-ran usbbootwatcher.exe and that did the trick - I can now boot Win7 successfully from my USB stick! happy71.gif


Happy you made it smile.gif

QUOTE (smudger @ Aug 10 2009, 09:11 PM) *
I have to say though, my main reason for wanting to boot & run from USB was that I thought it would perform better running native than in a VM on host XP. Admittedly I've only just done the install so haven't really used the native USB install yet but I have to say, I'm not convinced it's much, if any any, faster than running as a VM - even when the USB drive hosts the VM's virtual drive!

You may want to take into consideration actual speed of the device you installed to.
If a stick, they are NOT all the same, see this as an example:
http://arstechnica.com/hardware/news/2009/...ive-roundup.ars
http://arstechnica.com/hardware/news/2009/...e-roundup.ars/5

Besides, there are known issues related to filesystems used:
http://www.msfn.org/board/index.php?showtopic=125116

jaclaz
marietto
Hello,

I tried to boot and run Windows 7 on my usb disk using your method. This is what I did :

1) I Started installing Windows 7 on a sata disk and I stopped after first reboot.

2) I did an image of the installation of Windows 7 on the sata disk using Paragon Partition Server 10 and I burned it on a dvd

3) I installed a working copy of Windows 7 on the sata disk and I connected my USB disk there.

4) I restored the image files of Windows 7 on the USB disk

5) From the command prompt I ran usb_boot.bat and this is what happened :


========================================================================== 1 / 4

USB Boot preparation by MarV

Path to your system32 folder on usb drive (e:\Windows):

========================================================================== 2 / 4

Target: e:\Windows\System32

Creating backup of registry...
1 file(s) copied.
Register backup e:\Windows\System32\config\system.backup

Loading system hive...
The operation completed successfully.

Current control set is ControlSet001
Target architecture is: x86

Writing data to registry...
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.
Press any key to continue . . .

========================================================================== 3 / 4

Copying service...
1 file(s) copied.

Press any key to continue . . .

========================================================================== 4 / 4

All done

Press any key to continue . . .

everything seems to be good,but when I rebooted the pc,it doesn't boot giving a read disk error. It is configured as primary and active. Can you help me ? Thanks.
jaclaz
marietto,
you imaged a drive.

This is NOT part of the method, I'll quote for you:
QUOTE (marv @ Dec 29 2008, 02:20 PM) *
If you use Vista/2008 you might get error message (system cannot be installed on USB hdd blabla). Easiest way is to connect your USB hdd to your PC over sata/ide, start installation, and after first reboot, place it to your external USB case again (continue step 2, and continue installation from USB drive!!!). The harder way is to start installation somewhere else and after first reboot copy complete image of partition to your usb drive / I didnt tried this one yet pinch.gif


Using "Paragon Partition Server 10 " is not a description of what you did.

You may have imaged the whole disk or just the partition.

You may have restored the whole disk or just the partition.

YOu may have done in "raw" or "adaptive" mode.

Most probably, because of what you did in the above steps, you have as a result, BEFORE using the batch, an unbootable USB stick/device.

You need to have a bootable device, TESTED.
Then copy FILES (NOT the image) from the "partial install" to the USB device.
Then fix the BCD, see only a few posts above the experience with user smudger.

OR follow Dietmar's tutorial for VISTA:
http://www.911cd.net/forums//index.php?sho...mp;#entry118931

AND the suggested way to copy from one drive to the other.



jaclaz


marietto
...
marietto
This is what I did :

1) I installed Windows 7 until first reboot on the sata disk n.1
2) I copied the Windows 7 installation on the USB disk using Acronis True Image Home 2009. I checked if it was bootable.
3) I fixed the Winload error using the Windows 7 DVD in recovery mode
4) I attached the USB disk and a sata disk n.2 and I ran usb_boot.bat on it with folder destination d:\windows\system32 (the USB disk with Windows 7 installation inside) and I rebooted
5) The installation of Windows 7 has continued until the second reboots
6) I attached the USB disk and the sata disk n.2 again and I ran usb_boot.bat on it with folder destination d:\windows\system32 (the USB disk with Windows 7 installation inside)
7) I copied these files from the sata disk n.2 to the d\windows\system32 folder of the USB disk :

a) usb_boot.exe
cool.gif usbbootwatcher.exe
c) usbbootwatcher.conf

and I rebooted.

8) The Windows 7 installation ended regularly (if I detach the sata disk n.2 and I leave the usb disk alone,Windows 7 is unable to end the installation,because it reboots)
9) I detached the sata disk n.2
10) On the USB disk,I did :

a) sc create "USBBOOT" binpath= c:\windows\system32\usb_boot.exe start= auto
cool.gif sc start "USBBOOT"

and I rebooted
11) The computer started to reboots on the first Windows 7 logo,so I went in Safe Mode and I disabled the USBBOOT service and the problem is gone.
12) On the USB disk I did :

a) sc stop "USBBOOT"
cool.gif sc delete "USBBOOT"
c) usbbootwatcher /install

and I went to the service list to see if there was a service called usbbootwatcher,but there wasn't. I rebooted.
13) I attached the sata disk n.2 with the USB disk and on the first one I did :

a) usbbootwatcher /prepare d:\windows\system32

some messages appeared on the screen.
14) I started the computer with the USB disk and I went on the service list to see if there was a service called usbbootwatcher,but there wasn't and then I did :

a) create "USBBOOT" binpath= c:\windows\system32\usb_boot.exe start= auto
cool.gif sc start "USBBOOT"

now each time that I attach new devices,the computer reboots.

Did I some mistake ?
paintballgod
So i having problems getting this to work here is what i did...
i attached hdd to laptop through sata--used vista OEM cd to install to point of reboot and removed--attached to pc via usb enclosure (server 2003)--ran the batch file and input r:\windows...all commands completed successfully--plugged into pc via usb again and tried to boot but it BSOD and reboots. any ideas? i read the readme and followed but are there extra steps involved?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.