Jump to content











Photo
* * * * * 2 votes

[Tutorial] Boot Windows 7 from USB hard disk by karyonix


  • Please log in to reply
171 replies to this topic

#76 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 June 2010 - 05:00 PM

WHICH usbootfix.bat are you talking about?

This one?:
http://www.boot-land...?showtopic=9196
http://www.boot-land...?...st&id=10315


The problem looks like in:

for /F "skip=2 tokens=1,2,*" %I in ('reg query HKLM\SYSTEM\CurrentControlSet\services\<here the %~1 parameter is missing>') do (



@echo offif "%1"=="fix" goto :fixrem -- install taskcopy /y "%~f0" "%SystemRoot%\system32\usbbootfix.bat"SCHTASKS /Create /RU SYSTEM /SC ONEVENT /MO "*[System[Provider[@Name=&#39;Microsoft&#045;Windows&#045;UserPnp&#39;] and EventID=20003]]" /EC System /TN USBBootFix /TR "&#39;%SystemRoot%\system32\usbbootfix.bat&#39; fix" /Frem -- apply other settingsreg add HKLM\SYSTEM\CurrentControlSet\services\pciide /v Start /t REG_DWORD /d 0x0 /freg add HKLM\SYSTEM\CurrentControlSet\services\msahci /v Start /t REG_DWORD /d 0x0 /freg add HKLM\SYSTEM\CurrentControlSet\services\intelide /v Start /t REG_DWORD /d 0x0 /freg add HKLM\SYSTEM\CurrentControlSet\services\viaide /v Start /t REG_DWORD /d 0x0 /frem -- run :fix once after install:fixcall :fixservice usbehci "Boot Bus Extender"call :fixservice usbohci "Boot Bus Extender"call :fixservice usbuhci "Boot Bus Extender"call :fixservice usbhub  "System Bus Extender"call :fixservice usbstor "SCSI miniport"goto :eof:fixservicesetlocalset Start=set Group=for /f "skip=2 tokens=1,2,*" %%I in (&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\%~1&#39;) do (  if "%%I"=="Start" set Start=%%K  if "%%I"=="Group" set Group=%%K)if not "%Start%"=="0x0" reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Start /t REG_DWORD /d 0x0 /fif not "%Group%"=="%~2" reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Group /t REG_SZ /d "%~2" /fendlocalgoto :eof
The :fixservice label is CALLed only by these:

call :fixservice usbehci "Boot Bus Extender"call :fixservice usbohci "Boot Bus Extender"call :fixservice usbuhci "Boot Bus Extender"call :fixservice usbhub "System Bus Extender"call :fixservice usbstor "SCSI miniport"

Thus I cannot understand why the %~1 (and %~2) variables are NOT expanded (or, better, are expanded to <empty string>. :fine:Try modifying here:

:fixservicesetlocalset Start=

As follows:

:fixservicesetlocalECHO %1 is %~1ECHO %2 is %~2PAUSEset Start=

And here:

call :fixservice usbehci "Boot Bus Extender"call :fixservice usbohci "Boot Bus Extender"call :fixservice usbuhci "Boot Bus Extender"call :fixservice usbhub "System Bus Extender"call :fixservice usbstor "SCSI miniport"

to:

ECHO call :fixservice usbehci "Boot Bus Extender"call :fixservice usbehci "Boot Bus Extender"PAUSEECHO call :fixservice usbohci "Boot Bus Extender"call :fixservice usbohci "Boot Bus Extender"PAUSE
ECHO call :fixservice usbuhci "Boot Bus Extender"

call :fixservice usbuhci "Boot Bus Extender"
PAUSE
ECHO call :fixservice usbhub "System Bus Extender"

call :fixservice usbhub "System Bus Extender"
PAUSE
ECHO call :fixservice usbstor "SCSI miniport"

call :fixservice usbstor "SCSI miniport"
PAUSE


adding the RED part

And post output. (with ECHO normally OFF)

:)
Wonko

#77 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 30 June 2010 - 05:40 PM

This is the batch I used:
@echo off

if &#34;%1&#34;==&#34;fix&#34; goto &#58;fix

rem bcdedit /set {default} detecthal on

rem Run usbbootfix.bat &#40;this file&#41; as administrator

rem Shutdown.

 

rem -- install task

copy /y &#34;%~f0&#34; &#34;%SystemRoot%\system32\usbbootfix.bat&#34;

SCHTASKS /Create /RU SYSTEM /SC ONEVENT /MO &#34;*&#91;System&#91;Provider&#91;@Name=&#39;Microsoft-Windows-UserPnp&#39;&#93; and EventID=20003&#93;&#93;&#34; /EC System /TN USBBootFix /TR &#34;&#39;%SystemRoot%\system32\usbbootfix.bat&#39; fix&#34; /F

rem -- apply other settings

reg add HKLM\SYSTEM\CurrentControlSet\services\pciide /v Start /t REG_DWORD /d 0x0 /f

reg add HKLM\SYSTEM\CurrentControlSet\services\msahci /v Start /t REG_DWORD /d 0x0 /f

reg add HKLM\SYSTEM\CurrentControlSet\services\intelide /v Start /t REG_DWORD /d 0x0 /f

reg add HKLM\SYSTEM\CurrentControlSet\services\viaide /v Start /t REG_DWORD /d 0x0 /f

rem -- run &#58;fix once after install

 

&#58;fix

echo call &#58;fixservice usbehci &#34;Boot Bus Extender&#34;

call &#58;fixservice usbehci &#34;Boot Bus Extender&#34;

pause

echo call &#58;fixservice usbohci &#34;Boot Bus Extender&#34;

call &#58;fixservice usbohci &#34;Boot Bus Extender&#34;

pause

echo call &#58;fixservice usbuhci &#34;Boot Bus Extender&#34;

call &#58;fixservice usbuhci &#34;Boot Bus Extender&#34;

pause

echo call &#58;fixservice usbhub  &#34;System Bus Extender&#34;

call &#58;fixservice usbhub  &#34;System Bus Extender&#34;

pause

echo call &#58;fixservice usbstor &#34;SCSI miniport&#34;

call &#58;fixservice usbstor &#34;SCSI miniport&#34;

pause

goto &#58;eof

 

&#58;fixservice

setlocal

ECHO %1 is %~1

ECHO %2 is %~2

PAUSE

set Start=

set Group=

for /f &#34;skip=2 tokens=1,2,*&#34; %%I in &#40;&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\%~1&#39;&#41; do &#40;

  if &#34;%%I&#34;==&#34;Start&#34; set Start=%%K

  if &#34;%%I&#34;==&#34;Group&#34; set Group=%%K

&#41;

if not &#34;%Start%&#34;==&#34;0x0&#34; reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Start /t REG_DWORD /d 0x0 /f

if not &#34;%Group%&#34;==&#34;%~2&#34; reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Group /t REG_SZ /d &#34;%~2&#34; /f

endlocal

goto &#58;eof

This is the ouput from the above batch file execution:
1 fichier&#40;s&#41; copié&#40;s&#41;.

Opération réussie &#58; la tâche planifiée &#34;USBBootFix&#34; a été créée.

L&#39;opération a réussi.

L&#39;opération a réussi.

L&#39;opération a réussi.

L&#39;opération a réussi.

call &#58;fixservice usbehci &#34;Boot Bus Extender&#34;

usbehci is usbehci

&#34;Boot Bus Extender&#34; is Boot Bus Extender

Appuyez sur une touche pour continuer... 

L&#39;opération a réussi.

L&#39;opération a réussi.

Appuyez sur une touche pour continuer... 

call &#58;fixservice usbohci &#34;Boot Bus Extender&#34;

usbohci is usbohci

&#34;Boot Bus Extender&#34; is Boot Bus Extender

Appuyez sur une touche pour continuer... 

L&#39;opération a réussi.

L&#39;opération a réussi.

Appuyez sur une touche pour continuer... 

call &#58;fixservice usbuhci &#34;Boot Bus Extender&#34;

usbuhci is usbuhci

&#34;Boot Bus Extender&#34; is Boot Bus Extender

Appuyez sur une touche pour continuer... 

L&#39;opération a réussi.

L&#39;opération a réussi.

Appuyez sur une touche pour continuer... 

call &#58;fixservice usbhub  &#34;System Bus Extender&#34;

usbhub is usbhub

&#34;System Bus Extender&#34; is System Bus Extender

Appuyez sur une touche pour continuer... 

L&#39;opération a réussi.

L&#39;opération a réussi.

Appuyez sur une touche pour continuer... 

call &#58;fixservice usbstor &#34;SCSI miniport&#34;

usbstor is usbstor

&#34;SCSI miniport&#34; is SCSI miniport

Appuyez sur une touche pour continuer... 

L&#39;opération a réussi.

L&#39;opération a réussi.

Appuyez sur une touche pour continuer... 

----



This is batch file execution submission&#58;

Microsoft Windows &#91;version 6.1.7600&#93;

Copyright &#40;c&#41; 2009 Microsoft Corporation. Tous droits rÚservÚs.

 

30/06/2010 19&#58;15&#58;15,31

C&#58;\>usbbootfix > usbbootfix.out

&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\usbehci&#39; n&#39;est pas reconnu en

tant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\usbohci&#39; n&#39;est pas reconnu en

tant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\usbuhci&#39; n&#39;est pas reconnu en

tant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\usbhub&#39; n&#39;est pas reconnu en t

ant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\usbstor&#39; n&#39;est pas reconnu en

tant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

 



This is to test that &#34;reg&#34; command does exist&#58;

30/06/2010 19&#58;16&#58;11,72

C&#58;\>

 

Microsoft Windows &#91;version 6.1.7600&#93;

Copyright &#40;c&#41; 2009 Microsoft Corporation. Tous droits rÚservÚs.

 

30/06/2010 19&#58;17&#58;48,68

C&#58;\>reg

ERREURá&#58; syntaxe incorrecte.

Entrez &#34;REG /?&#34; pour afficher la syntaxe.

 

30/06/2010 19&#58;17&#58;49,88

C&#58;\>

So the problem is that "'reg" is not a valid command, while "reg" is.
I assume then that the 5 calls to !fixservice routine failed.

#78 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 30 June 2010 - 05:52 PM

@ktp

You can try to use the approach of IMG_XP package.
http://www.911cd.net...showtopic=23553

Anyway IMG_XP_Restore.exe is doing things slightly different.


Thank you, I already tried your method too, but all failed.
I have:
- usbbootfix.bat executed beforereboot
- usbbootwatcher installed
- usb_all.reg applied
- your registry tweaks applied (load hive for modification): iaStor, Add
I still get BSOD 0x7B on a system that has SATA controller in BIOS set to AHCI.

My USB HDD with Win7 boots OK on system with SATA controller set to IDE, but when I set to AHCI,
it boots, but then Win7 detects hardware change to the controller and disk, then ask for reboot.
Before reboot, I applied all the methods pre-cited, but then still BSOD 0x7B. iastor/iaahci drivers are present.

I kept for comparison the two SYSTEM file (one ide_OK, one ahci_BSOD). Loading them (hives), then export
then do a comparison. I see some differences but I cannot understand much. If anyone could take a look
I will upload them.

#79 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 June 2010 - 09:32 PM

@ktp

Try this on command line:

@ECHO OFF&For /F &#34;tokens=*&#34; %A IN &#40;&#39;reg.exe /?&#39;&#41; DO ECHO %A

Then try this in a BATCH:
@ECHO OFF

For /F &#34;tokens=*&#34; %%A IN &#40;&#39;reg.exe /?&#39;&#41; DO ECHO %%A

Same output?

Still a "n'est pas reconnu entant que commande interne" ? :cheers:

:cheers:
Wonko

#80 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 01 July 2010 - 08:47 AM

@Wonko the Sane

From command line:
01/07/2010 10&#58;43&#58;41,15

C&#58;\tmp>@ECHO OFF&For /F &#34;tokens=*&#34; %A IN &#40;&#39;reg.exe /?&#39;&#41; DO ECHO %A

REG Opération &#91;Liste de paramètres&#93;

Commande ECHO désactivée.

Opération  &#91; QUERY   | ADD	| DELETE  | COPY	|

SAVE	| LOAD   | UNLOAD  | RESTORE |

COMPARE | EXPORT | IMPORT  | FLAGS &#93;

Commande ECHO désactivée.

Code de retour &#58; &#40;sauf pour REG COMPARE&#41;

Commande ECHO désactivée.

0 &#58; réussite

1 &#58; échec

Commande ECHO désactivée.

Pour obtenir de l&#39;aide sur un type d&#39;opération particulier &#58;

Commande ECHO désactivée.

REG Opération /?

Commande ECHO désactivée.

Exemples &#58;

Commande ECHO désactivée.

REG QUERY /?

REG ADD /?

REG DELETE /?

REG COPY /?

REG SAVE /?

REG RESTORE /?

REG LOAD /?

REG UNLOAD /?

REG COMPARE /?

REG EXPORT /?

REG IMPORT /?

REG FLAGS /?


From x.bat:
C&#58;\tmp>x

REG Opération &#91;Liste de paramètres&#93;

Commande ECHO désactivée.

Opération  &#91; QUERY   | ADD	| DELETE  | COPY	|

SAVE	| LOAD   | UNLOAD  | RESTORE |

COMPARE | EXPORT | IMPORT  | FLAGS &#93;

Commande ECHO désactivée.

Code de retour &#58; &#40;sauf pour REG COMPARE&#41;

Commande ECHO désactivée.

0 &#58; réussite

1 &#58; échec

Commande ECHO désactivée.

Pour obtenir de l&#39;aide sur un type d&#39;opération particulier &#58;

Commande ECHO désactivée.

REG Opération /?

Commande ECHO désactivée.

Exemples &#58;

Commande ECHO désactivée.

REG QUERY /?

REG ADD /?

REG DELETE /?

REG COPY /?

REG SAVE /?

REG RESTORE /?

REG LOAD /?

REG UNLOAD /?

REG COMPARE /?

REG EXPORT /?

REG IMPORT /?

REG FLAGS /?

So same output, and no more errors. Conclusion ?

#81 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 July 2010 - 02:00 PM

So same output, and no more errors. Conclusion ?


None :cheers:, unfortunately, but reg.exe seems like it is found in both cases, so it cannot be the reason.

Try changing in the batch:
for /f &#34;skip=2 tokens=1,2,*&#34; %%I in &#40;&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\%~1&#39;&#41; do &#40;

  if &#34;%%I&#34;==&#34;Start&#34; set Start=%%K

  if &#34;%%I&#34;==&#34;Group&#34; set Group=%%K

&#41;

to:
for /f &#34;skip=2 tokens=1,2,*&#34; %%I in &#40;&#39;reg query HKLM\SYSTEM\CurrentControlSet\services\%~1&#39;&#41; do &#40;

ECHO Parameter is x_%~1_x

ECHO x_I_x=%%I

ECHO x_K_x=%%K

PAUSE

  if &#34;%%I&#34;==&#34;Start&#34; set Start=%%K

  if &#34;%%I&#34;==&#34;Group&#34; set Group=%%K

&#41;

:cheers:
Wonko

#82 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 01 July 2010 - 02:03 PM

@karyonix

I followed exactly your procedure:
- install Win7 in VMware
- run usbbootfix.bat and StorageBootStart.bat
- shutdown
- reboot inside VMware
- clone to USB hard disk using disk imaging software
- now boot from USB hard disk:
- OK on machine with SATA controller set to Ehannced, IDE
- BSOD 0x7B on machine with SATA controller set to Ehannced, AHCI :-(
I did verify that Start for msahci is 0.

#83 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 01 July 2010 - 02:54 PM

Remark on the procedure:

if you have en eSATA port on your laptop, then by using a combo eSATA-USB2 enclosure,
you can put your hard disk inside it.
1- Plug the enclosure using eSATA cable then install Win7 to the hard disk in the enclosure (eSATA = seen as internal disk by Win7).
2- When all setup and preparation (usbbootfix.bat...) are done, just plug the enclosure using this time USB2 cable to test.
No cloning is needed! Other advantage is that when something is wrong (unbootable with USB2), you can still boot it
with eSATA to repair.

I have a Delock 2"5 enclosure with USB2 and eSATAp (Power Over eSATA).
Maybe in the future there will be 2"5 enclosure with USB 3.0 and eSATAp (Power Over eSATA).

#84 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 01 July 2010 - 06:22 PM

@Wonko the Sane

I find out that my different Win7 versions are different somehow. In one system, the usbbootfix.bat works well,
no error. On the other, it produces errors as followed :

01/07/2010 20&#58;01&#58;18,80

C&#58;\>for /f &#34;tokens=*&#34; %a in &#40;&#39;reg.exe /?&#39;&#41; do echo %a

&#39;reg.exe /?&#39; n&#39;est pas reconnu en tant que commande interne

ou externe, un programme exÚcutable ou un fichier de commandes.

 

01/07/2010 20&#58;13&#58;19,97

C&#58;\>echo for /f &#34;tokens=*&#34; %a in &#40;&#39;reg.exe /?&#39;&#41; do echo %a >x.bat

 

01/07/2010 20&#58;14&#58;26,96

C&#58;\>x

a Útait inattendu.

 

01/07/2010 20&#58;14&#58;56,98

C&#58;\>x

A Útait inattendu.

 

01/07/2010 20&#58;16&#58;01,02

C&#58;\>ver

 

Microsoft Windows &#91;version 6.1.7600&#93;

 

01/07/2010 20&#58;16&#58;08,21

C&#58;\>type x.bat

@echo off

for /F &#34;tokens=*&#34; %A in &#40;&#39;reg.exe /?&#39;&#41; do echo %A

 

01/07/2010 20&#58;16&#58;27,62

C&#58;\>

Also I did not find trace of usbbootfix in planned tasks under Windows-UPnP.

#85 strongline

strongline
  • Members
  • 1 posts
  •  
    Canada

Posted 26 July 2010 - 03:00 PM

Thank you for such a great tutorial. It worked great after a few tweaks.

For those who sees 0x7b BSOD, I have a few tips:

- Keep your system hardware minimum when restart - if you have any hw that doesn't have a driver pre-loaded, you will see BSOD. You can plug in those devices after you have your system up and running. An example is that if I have my laptop on dock station, it gives me the blue screen. And I just didn't bother to find out which driver is for docking station. Instead, I start laptop then put it on the station.
The USB boot will choke even on most common device, such as a USB mouse. Again, plug it in after system is up.

- For those who has ACHI disk controller, you got two ways to fix it while you are in VMware
1. change your BIOS setting so it runs as traditioanal ATA controller, or
2. change the service mode to auto (value 0) in registry for the two services: iaStorV and msahci
they are under \\HKLM\System\CurrentControlSet\services

- To make sure your USB driver settings stay "auto" even after security patches, driver upgrades, I strongly recommend you add usbBootFix.bat as your shutdown script

--------
http://strongline.blogspot.com

#86 Djoby

Djoby
  • Members
  • 5 posts
  •  
    Romania

Posted 07 August 2010 - 05:04 PM

hello, I have been wanting to run my windows installation from an external hard drive for a while now, and your method worked like a charm, big THANKS for making this possible for me, but.... yes, there is a but :dubbio:) while my HDD is external running windows, it does not have virtual memory, and I cannot enable it whatsoever... therefore, from time to time I get a virtual memory low window... I am running Windows 7, 64 bit version and my virtual memory is where is should be when I plug the hard drive internally, using the sata connection... please help me, cheers

#87 drachko

drachko
  • Members
  • 2 posts
  •  
    France

Posted 16 November 2010 - 01:51 PM

hello karyonix,
I used the first option 'Install in IDE/SATA disk and move to USB' and then cloned the hard drive image to a usb drive then reboot and it works perfectly but only one time. When I reboot after shutdown I can see boot screen until the four colored balls appear then my pc restart.
Can you please help me?

#88 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 10 December 2010 - 05:23 PM

Hello,

Previously booting Win7 from my USB HDD I always got BSOD 0x7B from one physical laptop, no problem so
far with other laptops and under VMWare.

Now I found the command mentioned in post #2 of this topic :
http://www.boot-land...showtopic=10126

If you want to plug the usb OS to another PC, please run the command as administrator
\Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown


Curiously (and magically), now no longer BSOD 0x7B problem in any of my laptops! Great!
I run the command only once, and not each time switching to a different laptop.

#89 L A M A

L A M A

    Silver Member

  • Advanced user
  • 540 posts
  •  
    United Nations

Posted 10 December 2010 - 07:44 PM

This is a nice thread, I wonder if any information can also help my system to finish installation directly into .IMG file AFTER using "NT 6.x fast installer" or clone to .IMG etc ???


Having all solution put into ISO is next but until then, i'll be sniffing around all these related threads :cheers:

edit: I have no idea why this app is not used in tutorials, it can make life so easier :cheers: even when the installation completes, one can update registry files inside....
edit2: USB boot or something stores information in registry? all this looks very close to your image disk... karyonix
edit3: If USB can be used in different system, using IMG in different systems is cool (if it ever works)

#90 edborg

edborg

    Frequent Member

  • .script developer
  • 387 posts
  •  
    Italy

Posted 11 December 2010 - 06:37 PM

Hello,

Previously booting Win7 from my USB HDD I always got BSOD 0x7B from one physical laptop, no problem so
far with other laptops and under VMWare.

Now I found the command mentioned in post #2 of this topic :
http://www.boot-land...showtopic=10126



Curiously (and magically), now no longer BSOD 0x7B problem in any of my laptops! Great!
I run the command only once, and not each time switching to a different laptop.


After reading the above I unfortunately decided to do the same to be able to boot any PC.

If you want to plug the usb OS to another PC, please run the command as administrator

CODE
\Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown

After the shutting down the computer, you can plug the hard disk to another computer.

The result is that now I can no longer boot (on any PC) my Windows7 on USB HDD that has been working perfectly for over one year! :cheers: :lol: :cheers:

It starts booting, then there's almost immediately a quick BSOD, not even possible to read the error code, followed by a black screen and a reboot.

Can anybody hint which files might have been altered by this sysprep /generalize command???

edborg

Edit: Luckily I solved the problem by restoring the image of the working installation, but I still cannot explain what went wrong.
Any help to understand would be appreciated.

#91 mknaomi

mknaomi
  • Members
  • 1 posts
  •  
    United States

Posted 31 December 2010 - 06:20 PM

Hi! i am newbie, i have same problem with drachko;

hello karyonix,
I used the first option 'Install in IDE/SATA disk and move to USB' and then cloned the hard drive image to a usb drive then reboot and it works perfectly but only one time. When I reboot after shutdown I can see boot screen until the four colored balls appear then my pc restart.
Can you please help me?
fyi: it's perfect boot on dell xps 400,inspiron 8600,9300 but failed on dimension 8300,thk's for karyonix

#92 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 December 2010 - 06:31 PM

fyi: it's perfect boot on dell xps 400,inspiron 8600,9300 but failed on dimension 8300

Maybe you are confusing "7 on USB on a given computer" with "7 on USB working on *any* PC" or "Universal 7 on USB".
If this is the case, maybe :wheelchair: here you can find a viable solution :):
http://reboot.pro/9830/

:unsure:
Wonko

#93 Filip Hasa

Filip Hasa

    Frequent Member

  • Advanced user
  • 408 posts

Posted 10 January 2011 - 05:31 PM

Hello,

i am looking for steps how to find service driver which will be used during startup.

Example: I restore image to new hardware (VMware) and I want enable only require service of disk storage. Not all disk services.

Thank you for any tip

#94 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 11 January 2011 - 07:14 PM

i am looking for steps how to find service driver which will be used during startup.


No idea if cdob's vbs is useful for usb, but here it is:
http://www.911cd.net...showtopic=24245

#95 Filip Hasa

Filip Hasa

    Frequent Member

  • Advanced user
  • 408 posts

Posted 12 January 2011 - 04:09 PM

I got idea: how to get info which disk driver is used for WinPE?

#96 Uncle_HQ

Uncle_HQ

    Newbie

  • Members
  • 28 posts
  •  
    United Arab Emirates

Posted 02 February 2011 - 08:40 PM

I have previously successfully implemented procedure 2 (Install in VHD by using virtual machine).

Now one year later, I return back to this valuable forum, with a new requirement which requires me to move my primary internal SATA HDD with Win 7 to a USB enclosure and be able to boot from it externally. For this objective, I have been scratching my head trying to fully follow and understand procedure 1 (Install in IDE/SATA disk and move to USB) of this post on page one which for most of you may have been quite intuitive...but for me I am lost (my apologies). So here I go with my dumb questions...

Should I ignore the below steps since I already have a fully working Win 7 installed on my primary HDD which I want to move over to a USB enclosure. Or am I supposed to first take a Ghost/Acronis image clone of my primary HDD, before moving it to my USB enclosure ? Is this the point where I should attach my external USB HDD enclosure ?

1.Attach IDE/SATA disk to computer
You can create a new partition and mark it as active partition before boot from Windows 7 DVD

2.Boot from Windows 7 setup DVD (or other media),
create a partition in SATA (if not already created),
use diskpart to mark partition as active (if it is not the only partition in the computer),
install Windows 7

3.Boot from SATA disk into new Windows 7


Now on step 4:

4.Run cmd as administrator

@echo off 

setlocal 

rem Source drive, Destination drive 

set src=S: 

set dst=T: 

set bcddrive=%dst% 

 

echo List of files to be copied 

xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e /c /i /h /k /x /y /b /l 

echo Copy files from %src% to %dst% 

xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e /c /i /h /k /x /y /b /w 

 

echo Make sure boot manager are not compressed. 

compact /u %dst%\bootmgr %dst%\ntldr %dst%\grldr.* %dst%\menu.lst 

 

echo Adjust \DosDevices\C: value 

set dstsignature= 

for /f "skip=2 tokens=1,2,*" %%I in (&#39;reg query HKLM\SYSTEM\MountedDevices /v \DosDevices\%dst%&#39;) do ( 

set dstsignature=%%K 

) 

reg load HKLM\systemdst %dst%\Windows\system32\config\system 

reg add HKLM\systemdst\MountedDevices /v \DosDevices\C: /t REG_BINARY /d %dstsignature% /f 

reg query HKLM\systemdst\MountedDevices /v \DosDevices\C: 

reg unload HKLM\systemdst 

 

bcdboot %dst%\Windows /s %bcddrive% 

 

endlocal



Q1: Should I run the above code snippet (shown in part 4) from within my original SATA HDD before moving my SATA HDD to my external USB enclosure ?
Q2: What should I set as my src and dst in the above code ? Or should I have connected my USB HD enclosure at this point. If so, then it means I should have made a clone of my SATA HDD, and put the cloned version in the USB enclosure ? Perhaps this is the point which I missed out on ? Am I right ?


In step 6, we are asked to boot from a Win7 DVD, and hit Shift-f10 to open a cmd prompt.
Then in step 7, we are asked to run clone7.bat. I did not see clone7.bat attached to this post. SO I dug through the earlier posts and managed to find it elsewhere in this forum posted as follows:

clone7.bat:
@echo off

setlocal

rem Source drive, Destination drive

set src=S:

set dst=T:

set bcdentry={default}

set bcddrive=%dst%

echo List of files to be copied

xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e /c /i /h /k /x /y /b /l

echo Copy files from %src% to %dst%

xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e /c /i /h /k /x /y /b /w

echo Make sure boot manager are not compressed.

compact /u %dst%\bootmgr %dst%\ntldr %dst%\grldr.* %dst%\menu.lst

echo Adjust \DosDevices\C: value

set dstsignature=

for /f "skip=2 tokens=1,2,*" %%I in (&#39;reg query HKLM\SYSTEM\MountedDevices /v \DosDevices\%dst%&#39;) do (

set dstsignature=%%K

)

reg load HKLM\systemdst %dst%\Windows\system32\config\system

reg add HKLM\systemdst\MountedDevices /v \DosDevices\C: /t REG_BINARY /d %dstsignature% /f

reg query HKLM\systemdst\MountedDevices /v \DosDevices\C:

reg unload HKLM\systemdst

echo Copy bootmgr, BCD to %bcddrive%

if not exist %bcddrive%\bootmgr xcopy %src%\bootmgr %bcddrive%\bootmgr /c /h /k /x /y

if not exist %bcddrive%\Boot\BCD xcopy %src%\Boot\ %dst%\Boot\ /e /c /i /h /k /x /y /b

if not exist %bcddrive%\Boot\BCD goto endbcd

echo Update BCD entry.

bcdedit /store %bcddrive%\Boot\BCD /set {bootmgr} device partition=%bcddrive%

bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry% device partition=%dst%

bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry% osdevice partition=%dst%

bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry% detecthal yes

bcdedit /store %bcddrive%\Boot\BCD

:endbcd

endlocal

Q3: Is this the correct version of clone7.bat which I should be running at this point ? I am not using VHDs. This is very similar to the earlier code snippet which I am supposed to run in step 4 above, with the additional bcdedit commands. Is my understanding correct ? Is this the code I am expected to run at this stage in the procedure from within the Win 7 DVD command prompt ?


Now in step 8:

8.run clone7.bat from cmd.exe running as SYSTEM account.
Verify that source and destination drive are correct and press a key to start copy.

Q4: I am unclear what drive letters my src and dst should be set to in the above code, since my understanding is that I am running clone7.bat from Win 7 DVD within a system cmd prompt window (outside my HDD OS)
I apologize that what many of you found to be straight forward and intuitive, was very confusing for me, and I seem to have mis-understood some of the instructions. I would appreciate if someone could kindly bring me back on track here. At the end of the day, my intent is to take my primary HDD with Win 7, stick it in a USB case and be able to boot from it. Thanks.


#97 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 03 February 2011 - 01:11 AM

You don't have to use clone7.bat.
Just run usbbootfix.bat . That should be enough to make your Windows bootable from USB.
If you don't use usbbootwatcher, you may have to run usbbootfix.bat again when you install new USB devices.


I re-read the first post. I think the tutorial is wrong !
I am not sure I messed up during the last time I edited it or moving from bootland.net to reboot.pro changed it.
I will rewrite the first post.

#98 Uncle_HQ

Uncle_HQ

    Newbie

  • Members
  • 28 posts
  •  
    United Arab Emirates

Posted 03 February 2011 - 07:18 AM

Dear karyonix,

Thanks for the confirmation. I was worried that perhaps I was losing my mind, since I was not able to follow the instructions on page 1 of your initial post (Install in IDE/SATA disk and move to USB). It was comfirting to know that it wasn't me...just the procedures haven't been updated in a while and that they are out of sync.

Your advice was spot on. All I had to do was the following in my case, as you advised:

1) run usbbootfix.bat
2) take a clone replica image of my internal SATA HDD using Acronis to an external USB HDD
3) Boot my computer from the newly created replica image on my external USB HDD

It boots perfectly !

However, 2nd time, it fails to boot. Does this mean I should have run usbbootfix.bat everytime I reboot my USB HDD ?

If so, then I guess I have to repeat steps 1-3 above making sure that everytime I reboot my external USB HDD, that I should first run usbbootfix.bat. Please confirm.

You have been very helpful and I appreciate your feedback.

Regards,
Uncle_HQ

#99 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 03 February 2011 - 08:27 AM

usbbootfix.bat is scheduled to run on some PnP installation events that happen when I test, but it may not cover enough events.
You may use task scheduler and schedule it to run usbbootfix.bat on some more events, or run every few minutes.

Alternatively you may use marv's usbbootwatcher.exe instead.

I think that in the long run using usbbootwatcher.exe is better, more resistant to changes.

#100 Uncle_HQ

Uncle_HQ

    Newbie

  • Members
  • 28 posts
  •  
    United Arab Emirates

Posted 15 February 2011 - 08:10 PM

Would your method work with USB 3.0 external drive enclosure ? I am fortunate enough to have a newer laptop which has 2 USB 3 ports, and I just purchased a USB 3 drive enclosure. I want to be able to install Windows 7 on this external USB 3 HDD and be able to boot from it. Would your karyonix's tutorial work with USB 3 ?

Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users