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

#101 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 16 February 2011 - 06:12 AM

I've made a lot of progress with this..

The only stumbling block I am seeing here is that I get a 7B error when I try to boot from an AMD machine using SATA in compatible mode (it works when NVRAID is enabled). It works from a Dell laptop that uses IDE, one with AHCI and another without AHCI.

Not sure why that is.. the machine that errors out has both SATA and IDE channels, whereas the others that succeed either have one or the other. There were no IDE channels on the computer I installed it on...

It seems like what would really help would be if we could prevent the machine from loading the storage drivers until its fully booted... Not even sure if this is possible- just throwing it out there..

UPDATE: Strangely enough, booting into safe mode first removed the 7B error when booting normally. No Idea why.

Edited by Agent_Smith, 16 February 2011 - 06:32 AM.


#102 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 16 February 2011 - 08:53 AM

@ Uncle_HQ
I don't know which service is responsible for USB 3.0. Does Windows 7 have built-in USB 3.0 driver ?

@ Agent_Smith
Maybe the machine that BSOD has IDE and SATA device ID associated with non-MS services which has Start value = 3.
IDE or SATA driver service of the machine should have Start = 0 to be able to boot successfully.

#103 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 February 2011 - 11:17 AM

Some USB related thingies can be found here:
http://reboot.pro/13638/

Basically if the PNP ID the device has is USB 2.0 compatible, it should work allright, in the worst case it will use USB 2.0 speed until you install the 3.0 drivers. :dubbio:

:diablo:
Wonko

#104 Uncle_HQ

Uncle_HQ

    Newbie

  • Members
  • 28 posts
  •  
    United Arab Emirates

Posted 16 February 2011 - 08:21 PM

@ Uncle_HQ
I don't know which service is responsible for USB 3.0. Does Windows 7 have built-in USB 3.0 driver ?

@ Agent_Smith
Maybe the machine that BSOD has IDE and SATA device ID associated with non-MS services which has Start value = 3.
IDE or SATA driver service of the machine should have Start = 0 to be able to boot successfully.


@karyonix

Yes, I believe Win 7 does have built in drivers for USB 3. Would you be able to support me to get a bootable USB 3 solution using your guide ? Can we start a separate discussion thread for this. I would be willing to share my findings and leverage your support if you think it may perhaps be useful to others. USB 3 will soon become more popular in machines. My system is using nusb3xhc.sys, nusb3drv.cat, nusb3drv.inf, and nusb3hub.sys as the respective driver and inf files for USB 3. I have reviewed the post provided by wonko http://reboot.pro/13638/
but the final solution is not documented in an easy to understand procedure such as yours.

#105 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 February 2011 - 08:42 PM

but the final solution is not documented in an easy to understand procedure such as yours.

Actually a "final solution" is supposedly documented here:
http://reboot.pro/13638/page__st__6
http://reboot.pro/10126/page__st__172

But you need to read and learn how to integrate the drivers offline using DISM (link also provided):
http://technet.micro...355(WS.10).aspx

:confused1:
Wonko

#106 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 18 February 2011 - 12:20 AM

Just curious, why is LoaderOrderGroup different in each of these tutorials. Some have USBSTOR under boot bus extender, System bus extender and SCSI miniport. What is the difference here?

#107 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 February 2011 - 11:57 AM

Just curious, why is LoaderOrderGroup different in each of these tutorials. Some have USBSTOR under boot bus extender, System bus extender and SCSI miniport. What is the difference here?

They are attempts to get the "right" Group.
The matter is talked about here (original Usbbootwatcher thread):
http://www.911cd.net...topic=22473&hl=

The actual drivers are of THREE kinds:
  • usbohci, usbehci and usbuhci are at the "lower level" let's call them "bus or extension or chipset drivers"
  • usbhub is "intermediate", let's call it "connection driver"
  • usbstor is "higher level", let's call it "storage driver"

Each one in the list needs the preceding one to be loaded in order to work.
Putting them all in the same group may create a timing problem.

Here are the "old" NT/2k Groups and their order:
http://support.micro...kb/115486/en-us

And here a more updated documentation:
http://msdn.microsof...2(v=vs.85).aspx
http://msdn.microsof...9(v=vs.85).aspx

An XP (as reference) has this order:
Spoiler


Here we are interested to the first 4 only:
  • System Reserved
  • Boot Bus Extender
  • System Bus Extender
  • SCSI miniport
By giving to usbohci, usbehci and usbuhci "Boot Bus Extender" we make sure they are loaded VERY early.
By giving to usbhub and usbstor "System Bus Extender" we make sure they are loaded later. (and this has been empirically proved to work)

You can try using:
  • usbohci, usbehci and usbuhci "Boot Bus Extender"
  • usbhub "System Bus Extender"
  • usbstor "SCSI miniport"
which is even more "accurate".

Or you can also modify the list in Registry Key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder
to something like:
  • System Reserved
  • Mickey Mouse
  • Minnie
  • Goofy
  • Boot Bus Extender
  • System Bus Extender
  • SCSI miniport

and change the Group of the services accordingly. :lol:

B)
Wonko

#108 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 18 February 2011 - 10:39 PM

Thanks to everyone for their replies, you've all been very helpful.

I've actually made a snapshot capable version using differencing disks. It works very well, even though the size balloons very fast. Things work great on a USB HD.

I am having a bit of trouble launching from a USB flash drive though. When I use a fixed vhd it is SLOW, despite having a very fast flash drive. With an expandable vhd I get a stop 136 error.

Do you thinking using the diskmod filter driver would alleviate this (making the machine think it is not a removable disk?).

#109 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 19 February 2011 - 09:21 PM

I've tried a number of filter drivers, and unfortunately nothing has worked for me in regards to the USB flash drive. Sadly I can still only boot to a fixed drive, and it takes an extremely long time to use (not just the loading, something is clearly malfunctioning). My flash drive is one of the fastest out there, and does 20 MB/s write & 40 MB/s read.

Due to the fact that the VHD won't expand, its clear that the system is treating the USB flash drive differently... and I'm not sure why.

Anyone have any insight on this?

#110 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 February 2011 - 01:43 PM

Anyone have any insight on this?

It is possible that the "Removable bit" changes something, but I doubt it. :thumbsup:

You can always try to find the appropriate utility and "flip it" to "Fixed"....

:cheers:
Wonko

#111 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 20 February 2011 - 10:17 PM

I thought it was the removable bit, but I figured the filter drivers would have taken care of that.. Unfortunately, there isn't a manufacturers tool for any of my flash drives, so I can't truly flip it.

I was thinking that the controller on the flash drives might not operate like your typical SATA drive, and not function properly. I would imagine that there is probably some tweaking needed for flash manufacturers to make the distinction between SSD and flash drive.

#112 sapper21be14g

sapper21be14g
  • Members
  • 5 posts
  •  
    United States

Posted 26 February 2011 - 12:21 AM

First of all BIG thanks for to karyonix for taking the time to create a guide even I could grasp. on that note i'm quite stumped. i followed your guide by creating a partition on my internal harddrive, installing win 7 to said partition, booting to system account, and then running clone from there. Everything seemed to work fine until i tried to boot from usb. At that point windows boot manager informed me:
File:\windows\system32\config\system
Status:0xc0000225
Info:Windows failed to load because the system registry file is missing or corrupt.
Hmmm :dubbio: ok so i booted back to internal win 7 partition system profile to see. well sure enough the usb i tried to clone to was missing several files. well naturally i tried to copy them...naturally win flipped me the bird and said it was using them first. so i figure run clone again and see results. turns out during the copy process several files recieved a sharing violation message and were skipped. mind you i tried from the system admin account with elevated prompt. If anyone could shed any light as to why i am getting my hand popped, i would greatly appreciate it.

Edited by sapper21be14g, 26 February 2011 - 12:34 AM.


#113 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 26 February 2011 - 12:48 AM

You cannot copy from running Windows as source.
Try boot from Windows setup DVD or another copy of installed Windows.

#114 sapper21be14g

sapper21be14g
  • Members
  • 5 posts
  •  
    United States

Posted 26 February 2011 - 01:16 AM

so you are saying boot to my vista partition and then clone win 7 partition to usb?

#115 sapper21be14g

sapper21be14g
  • Members
  • 5 posts
  •  
    United States

Posted 26 February 2011 - 06:57 AM

Ok so i see i completely missed the not from source partition part of instruction. So i got passed that part but instead now i get this:
File:\windows\system32\config\winload.exe
Status:0xc0000428
Info:Windows cannot verify the digital signature for this file.
After a little looking around i found that this was my boot manger command file. I then compared the source with the clone and they are identical including the digital signatures. So i checked the bcdedit and this is what i got.
Posted Image
Suffice it to say my clone doesnt match with the internal partitions. Any ideas as to where i went wrong. Oh by the way if you couldnt tell i am new to this so bear with me.

#116 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 26 February 2011 - 09:11 AM

I think BCD is wrong because Windows Vista does not have bcdboot command.
Try assign a drive letter to you USB drive (U: in this example) and run bcdboot command.
U:\Windows\system32\bcdboot U:\Windows /s U:
Check the new BCD.
bcdedit /store U:\Boot\BCD


#117 sapper21be14g

sapper21be14g
  • Members
  • 5 posts
  •  
    United States

Posted 26 February 2011 - 11:18 AM

well that worked so far as it boots from usb however now it will only boot from there. it will not boot from internal hard drive and my vista wont even show up without usb connected.so im guessing it must stay on internal

#118 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 26 February 2011 - 12:26 PM

Did you mess up your internal disk's BCD ? You should check your internal disk's BCD.

Please check BCD in all active partitions in all disks that have BCD.
bcdedit /store C:\Boot\BCD

bcdedit /store D:\Boot\BCD

bcdedit /store E:\Boot\BCD

etc.
Please post all of them.

#119 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 28 February 2011 - 05:52 AM

Here is a post that might help others:

I took a VHD made directly on my C: drive (regular VHD boot), and tried to port it to USB. It simply would not work on the computer it was built on, no matter what I tried. It would work in every other computer, but the computer it was originally installed on would crash with a STOP 7B error. Essentially, it worked on every computer except the one where it originally resided.

I fixed the issue by:

1) booting the VHD via USB on another computer (any other computer would do).

2) Using the following link to enable non present devices in device manager
http://support.microsoft.com/kb/315539

3) Removing every entry of a non-present device. Basically, any hardware that remained from the original computer was removed.


Once this was done, there was no issue booting via USB on the original computer that created the VHD.

#120 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 28 February 2011 - 06:02 AM

Also, in case anyone might find this useful... here is a quick tip on how to add a rollback via differencing disks. Assume G: is your USB HD path, and your original vhd is called "G:\original.vhd".

(IN DISKPART)
create vdisk file="G:\snapshot.vhd" parent="G:\original.vhd"
-This snapshots your VHD-

(IN COMMAND PROMPT)
copy G:\snapshot.vhd G:\snapshot.vhd.empty
-This makes a copy of the snapshot vhd in its empty form. The GUID will remain the same, so reverting to the snapshot will just involve a file copy-

Now, add snapshot.vhd to the BCD the same way you would with the original. I use EasyBCD since its pretty simple to do. You could also use the bcdboot command.

Now to roll back the snapshot:
(IN COMMAND PROMPT)
G:
cd\
copy /y snapshot.vhd.empty snapshot.vhd

This will wipe all of the changes, and you will be back to your original VHD image. The downside is that the differencing disks grow FAST. You can put the above command in a batch file, and then have a mechanism to wipe your snapshot with a double click.

Hope someone finds this useful..

#121 davlak

davlak

    Frequent Member

  • Advanced user
  • 224 posts
  •  
    Italy

Posted 28 February 2011 - 08:26 AM

@Agent_Smith
hey, it IS useful, I'm just lookin for something similar.
Thanks a lot :unsure:

#122 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 28 February 2011 - 10:04 AM

@Agent_Smith
If you want to live dangerously:
http://www.robvander....com/devcon.php
Check the RmHidDev.bat

:unsure:

:cheers:
Wonko

#123 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 28 February 2011 - 02:50 PM

@Agent_Smith
If you want to live dangerously:
http://www.robvander....com/devcon.php
Check the RmHidDev.bat

:dubbio:

:unsure:
Wonko


That sounds like it would have made it a lot faster! I'm a little wary of the warning about crippling the OS.. but I guess that is what snapshots are for!

#124 Agent_Smith

Agent_Smith

    Member

  • Members
  • 37 posts
  •  
    United States

Posted 28 February 2011 - 02:57 PM

@Agent_Smith
hey, it IS useful, I'm just lookin for something similar.
Thanks a lot :dubbio:


Glad it was useful to someone :-)

#125 sapper21be14g

sapper21be14g
  • Members
  • 5 posts
  •  
    United States

Posted 01 March 2011 - 10:04 PM

Did you mess up your internal disk's BCD ? You should check your internal disk's BCD.

Please check BCD in all active partitions in all disks that have BCD.

bcdedit /store C:\Boot\BCD

bcdedit /store D:\Boot\BCD

bcdedit /store E:\Boot\BCD

etc.
Please post all of them.

i appreciate the help i have figured out what i needed to do. The command actually did mess up my internal BCD. So what i did was reversed the process from inside win 7 and then went back into my original partition and fixed the BCD. Then i booted back to the USB win 7 and fixed the USB BCD which in retrospect i could have done when i was in there earlier. However it is not recognized in any other computer, not really a big deal right now though.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users