Jump to content











Photo
- - - - -

USB HDD boot and Windows 7 SP1


  • Please log in to reply
30 replies to this topic

#1 imperia

imperia
  • Members
  • 4 posts
  •  
    Bulgaria

Posted 28 March 2011 - 04:15 PM

Hello,

I used 'NT 6.x fast installer' to install windows 7 to external usb hdd. It worked flawlessly until I installed SP1.
Windows stopped booting with the famous 0x7b stop error. I tried to fix my installation by loading registry hive and manually editing the usb entries in registry. Didn't worked!
Everything seems fine in registry.

Another thing I tried is slipstreaming SP1 with W7. I used again nt fast installer again. No success!

My guess is there is another usb driver we have to enable in registry.

Lets try to solve this issue together.

Thank you!

#2 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 345 posts

Posted 28 March 2011 - 04:32 PM

My guess is there is another usb driver we have to enable in registry.

That sounds very sensible... Have you checked that all the USB related services mentioned here are still set to boot-start ?
If not, set start=0 for all of them and try again ;-)

#3 imperia

imperia
  • Members
  • 4 posts
  •  
    Bulgaria

Posted 28 March 2011 - 04:35 PM

Yes,

I "Load Hive" in registry editor and checked all entries. They seem fine. Also NT 6.x fast installer had integrated
UsbBootWatcher into my installation and it should take care of all USB entries according to .conf file:


[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"



#4 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 345 posts

Posted 28 March 2011 - 04:54 PM

Also NT 6.x fast installer had integrated UsbBootWatcher into my installation and it should take care of all USB entries according to .conf file:

Agreed, but when you installed SP1, something is likely to have been overwritten....
Also, once you get a BSOD, you should check ControlSet001 but also ControlSet002. Maybe I'm just going in the wrong direction though :)

#5 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 345 posts

Posted 28 March 2011 - 05:12 PM

This might help you. It explicitly says:

Remember to re-patch after a new service pack updates installed.



#6 imperia

imperia
  • Members
  • 4 posts
  •  
    Bulgaria

Posted 28 March 2011 - 05:48 PM

check ControlSet001 but also ControlSet002

I was unsure and I checked both.

This might help you. It explicitly says:

Before I formatted my first w1sp1 installation I tried this tool as some user suggested. no luck

Do you have SP1 working?
Do somebody here can say that he have working SP1 booting from USB?

#7 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 345 posts

Posted 29 March 2011 - 11:39 AM

Do somebody here can say that he have working SP1 booting from USB?

I haven't tried it myself, but amalux says he has SP1 booting from USB:

Run PWBoot patch on the external drive you just restored your image to. You run the patch from your host OS or PE and select external drive as target.

5) Now reboot to your USB-HDD or flash drive to see the magic. I've done this many times now with Windows 7 x64 (x86 works too) SP0 and SP1 Enterprise. I've restored images to USB-HDD 2.0 and 3.0 and UFDs as well, I'm always surprised how fast and easy it is and thought I'd share it with you, hope it helps.



#8 razibu

razibu
  • Members
  • 4 posts
  •  
    Switzerland

Posted 01 April 2011 - 09:22 AM

Using PWBoot patch, I can also run SP1 of Windows7 on a USB HDD. Even if it works very well on my desktop PC, I have more difficulties on my laptop. Just after the patch, it does work once but after reboot I get a blue screen. It is rather disturbing. Why doesn't it work always on the laptop (HP6930p)?

Raz

#9 imperia

imperia
  • Members
  • 4 posts
  •  
    Bulgaria

Posted 01 April 2011 - 12:59 PM

Well I tried PWBoot - no success. I used NT 6. fast installer method for installing windows itself. I guess I should wait for somebody to write some tutorial. Because this doesn't work.

#10 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 01 April 2011 - 02:15 PM

I guess we (who say it works) should say it works in a specific range of conditions. For me, setting up Win7 (x86/64/sp0/1/ult/ent)install on real hardware; creating a backup image of the working install; restoring that image directly to USB (pri/active) partition and running PWBoot on that partition offline works every time :dubbio:

#11 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 11 April 2011 - 07:22 PM

I just saw this thread, unfortunately I don't have enough time to monitor reboot.pro on a regular basis (I wish I would...).

I have Win 7 SP1 booting from an external USB device, it even is inside a vhd file. I used a MSDN installation DVD that has SP1 integrated.

I created an empty vhd, mounted it (Win 7 as host system) and copied the system into that vhd using imagex /apply. Then I modified some registry keys so that the usb drivers
usbccgp
usbehci
usbhub
usbohci
usbstor
usbuhci
are present at boot phase. The parameter VirtualDiskExpandOnMount of the service fsdepends is set to 4 and the inf files
usb.inf
usbport.inf
brmfcsto.inf
are modified so that the usb drivers will always be loaded at boot time. The corresponding pnf files are deleted and the changes are also applied to the folder System32\DriverStore\FileRepository and Winsxs. After creating a new entry in the bcd store for the vhd-boot everything just worked perfectly after booting that system. When the system was initialized successfully I created a differencing vhd file and changed the boot entries accordingly. Now I have a system that I can boot natively and do some software testing.

I found the details for this approach in some forum for plain Windows 7. I then adopted it for SP1. If there is interest I could post more details.

Many Greetings
MichaelZ

#12 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 28 April 2011 - 11:49 AM

Hello everyone,

Windows Update 2011-04-27 (to be precise, KB982018) destroys the so far working SP1 USB boot configuration. After reboot there is STOP 0x0000007B back again. ;)

After booting another system (Win7PE, Win7 from fixed disk) it is necessary to set the Start parameter of
usbehci, usbohci and usbstor
to 0 again in the USB mountable system. Furthermore usbstor.inf has changed (version number) so the corresponding changes in Inf, DriverStore and WinSxS have to be redone also.

Many Greetings
MichaelZ

#13 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 28 April 2011 - 03:07 PM

Forgive me if this doesn't apply to your specific setup or if it seems obvious but any time you install a Windows update it is necessary to re-apply whatever USB patch was used to resolve the stop 7B originally. That's one reason it's important for patch to be easily applied (PWBoot).

:happy_dance:

#14 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 28 April 2011 - 06:08 PM

After booting another system (Win7PE, Win7 from fixed disk) it is necessary to set the Start parameter

Use manufacturer hack:
default USB *.inf files and early driver load: Bootable Windows USB Stack
http://reboot.pro/98...post__p__127410

No need to fix USB driver Start parameter.

reg.exe add HKLM\System\CurrentControlSet\Control /f /v BootDriverFlags /t REG_DWORD /d 0x6

reg.exe add HKLM\System\CurrentControlSet\Control\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 15000


#15 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 28 April 2011 - 06:24 PM

Use manufacturer hack:
default USB *.inf files and early driver load: Bootable Windows USB Stack


Hi cdob,

how do I know that Windows 7 has the Bootable Windows USB Stack and not the Standard Windows USB Stack?

Many Greetings
MichaelZ

#16 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 28 April 2011 - 07:03 PM

how do I know that Windows 7

I don't know.
Most likely Windows 7 use Standard Windows USB Stack
Registry settings works at default 7 SP1 driver files, fixed disk.

Windows Embedded Standard 7 Service Pack 1 Evaluation Edition
http://www.microsoft...a6-770023c07b92
There are different usbstor.sys files: may relate to fixed and removable disk

#17 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 29 April 2011 - 09:21 AM

No need to fix USB driver Start parameter.

reg.exe add HKLM\System\CurrentControlSet\Control /f /v BootDriverFlags /t REG_DWORD /d 0x6

reg.exe add HKLM\System\CurrentControlSet\Control\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 15000

Hi cdob,

setting those two registry values without other USB stack modifications did NOT work for me in a test installation.

What I did (in short):

1) create a Win7-SP1 inside a VHD file on a USB hard disk using the Microsoft supported approach using imagex (host is Win7-SP1 and WAIK 3 with SP1 update)

2) modify Registry (S: is the mounted VHD file):
C:\Windows\system32>REG LOAD HKLM\TEMP S:\WINDOWS\SYSTEM32\CONFIG\SYSTEM

Der Vorgang wurde erfolgreich beendet.



C:\Windows\system32>REG QUERY HKLM\TEMP\Select /v Current



HKEY_LOCAL_MACHINE\TEMP\Select

    Current    REG_DWORD    0x1



C:\Windows\system32>REG ADD HKLM\TEMP\System\ControlSet001\Control /f /v BootDriverFlags /t REG_DWORD /d 0x6

Der Vorgang wurde erfolgreich beendet.



C:\Windows\system32>REG ADD HKLM\TEMP\System\ControlSet001\Control\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 15000

Der Vorgang wurde erfolgreich beendet.



C:\Windows\system32>REG UNLOAD HKLM\TEMP

Der Vorgang wurde erfolgreich beendet.


3) create entry in boot manager on USB hard disk for VHD boot

4) boot USB hard disk VHD test system

STOP Error :(


Many Greetings
MichaelZ

#18 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 01 May 2011 - 04:31 PM

setting those two registry values without other USB stack modifications did NOT work for me in a test installation.

create a Win7-SP1 inside a VHD file on a USB hard disk using the Microsoft supported approach using imagex

Which hardware do you use?

BootDriverFlags does load marked drivers

[HKEY_LOCAL_MACHINE\usb\ControlSet001\services\usbehci]
"BootFlags"=dword:00000004

VHD drivers are loaded
vdrvroot use group "Boot Bus Extender" and start=0
vhdmp use group "SCSI miniport", start=3 and BootFlags=2


Another hints:

http://www.nullsessi...08-r2-from-usb/

http://blog.frankovi...7-on-usb-stick/

http://archive.msdn....ootHVSR2FromUSB

Release Date Nov 16 2009

That's before 7 SP1. Windows 6.1 does boot from USB at native level.

Deploying Microsoft Hyper-V Server 2008 R2 on USB Flash Drive
http://technet.micro...893(WS.10).aspx

Timeout for boot device increase
To ensure that the system can properly boot from a flash device, the default PollBootPartitionTimeout registry key value has been increased. This registry key is used to control how long the kernel waits for PnP to surface the boot disk before it stops with bugcheck code 0x7B.
* Registry Key: HKLM\SYSTEM\CCS\Control\PnP\PollBootPartitionTimeout
* Registry Value: 30000

Try 30000.


As for testing:
Asrock N68C-S, Athlon X2 5600
IDE and SATA controller disabled in BIOS, hence no internal mass storage controller available

Win7 SP1 x86, VHD installation file created
imagex /apply u:\sources\boot.wim 2 v:\
BootDriverFlags and PollBootPartitionTimeout added
x64 \sources\install.wim added

x86 USB VHD flat file booting does work.
x64 files copied to USB HDD:
imagex /apply x:\sources\install.wim 3 c:\
Installation does finish. Booting is possible.

Windows 7 files applied in to a VHD file.
Installation does finish. Booting is possible.

One more:
VHD installation file: boot.wim applied to a vhd file
Version 6.1.7000, that's files from 2008.
BootDriverFlags and PollBootPartitionTimeout added
Windows 7 does boot from VHD file.

From 6.1.7000 default install.wim
[HKEY_LOCAL_MACHINE\7000\ControlSet001\Control]

"BootDriverFlags"=dword:00000000



[HKEY_LOCAL_MACHINE\7000\ControlSet001\Control\PnP]

"PollBootPartitionTimeout"=dword:00000000
USB booting is integrated since several years, but disabled by default.


Does another hardware gives different results?

#19 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 01 May 2011 - 05:01 PM

Which hardware do you use?
{...}


Good grief, cdob. You gave me a lot of homework to do :)

A few stuff can be answered immediately. My test platform is a Dell Latitute D830 having an Intel Core 2 Duo (T7500) and ICH8-M AHCI internal disk and ICH8 USB (usbehci). The attached usb disk is a Hitachi HTS545050KTA300 and a USB\VID_04FC&PID_0C25 chip.

I noticed one difference. When I create the VHD system I only apply install.wim and not both boot.wim and install.wim. At present I do not have the Microsoft Technet article at hand, but iirc only install.wim is mentioned, but probably the boot.wim needs to be applied also.

I will try some more testing tomorrow.

Many Greetings
MichaelZ

#20 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 01 May 2011 - 06:07 PM

When I create the VHD system I only apply install.wim and not both boot.wim and install.wim.

To clarify:
It's sufficient to apply install.wim to VHD file.

Boot.wim was another approach:
install from one VHD file and write to another VHD file: that's two different files used, I used two USB devices actually.
Remember both IDE and SATA are disabled in BIOS.
I had to install from USB: why not invent a new approach on the road?
Install Windows 7 from one VHD file, Vista from another VHD file, 2008 R2 from another VHD file,...

It should be sufficient to boot from a internal DVD and apply install.wim to USB HDD only.

Does your Dell boot a flat file XP PE from USB, default ntdetect.com?

#21 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 01 May 2011 - 06:07 PM


Oh no.

I'm such a Blödmolli (German word for dweeb, dimwit or whatever) :frusty: :frusty: :frusty:

I made such a bad mistake, unbelievable. :ranting2:

On the other side, my fault was well documented in post #17 at 2) :mellow:
And no one did notice it. :ranting2:

I had just enough time this evening to make one of the tests that cdob had suggested. It was a good one I took as a start. :ranting2:

I changed PollBootPartitionTimeout to 30000. I have to correct myself: I wanted to change it. But it was not set. :)

I had changed HKLM\TEMP\System\ControlSet001\Control in my first test. But thats the wrong registry path. It must be HKLM\TEMP\ControlSet001\Control when mounting the System registry hive as HKLM\TEMP on the host system. :angry7:

After setting the correct two registry keys everything went just perfect. :thumbup: :thumbup: :thumbup:

The USB booted system also survived KB982018 and several reboots afterwards. :cheers:

And only two registry keys need to be set. :happy_dance2:

I wonder why Microsft has two different USB stacks in their embedded environment?

Many thanks cdob!

Many Greetings
MichaelZ

#22 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 01 May 2011 - 07:20 PM

After setting the correct two registry keys everything went just perfect. :) :mellow: :cheers:

Thanks for report.
Yes, native USB boot survive a SP install or a KB update.

The strange part:
native USB booting works since two years, but almost nobody uses this solution.

set_7_usb_boot.cmd is attached. Apply this to a offline windows
set_7_usb_boot.cmd U:\windows

Edited:
v0.02 bug fix loaded_system

Attached Files



#23 Wh1t3c0d3r

Wh1t3c0d3r

    Member

  • Tutorial Writer
  • 80 posts
  • Location:/usr/bin/php
  • Interests:I'm an enthusiast PHP programmer working as an IT technician (level 2) for a small company that create software.
    I love to help and teach things to people for free (if possible)
  •  
    Canada

Posted 01 May 2011 - 11:03 PM

Thanks for report.
Yes, native USB boot survive a SP install or a KB update.

The strange part:
native USB booting works since two years, but almost nobody uses this solution.

set_7_usb_boot.cmd is attached. Apply this to a offline windows

set_7_usb_boot.cmd U:\windows


What do you mean by offline? It as the update or not?

#24 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 May 2011 - 04:35 AM

What do you mean by offline? It as the update or not?


Offline = NOT currently booted

Like "run the batch from a PE or another (USB stick/HD based) instance of Windows 7".

Or:
  • Boot your PC "normally" from internal HD
  • Insert the USB stick containing the USB based 7 that doesn't boot from USB anymore because of the 0x0000007b BSOD caused by the update
  • check that the USB drive containing \Windows\ directory gets letter U:
  • open a command prompt, navigate to where you put the set_7_usb_boot.cmd
  • type:
  • set_7_usb_boot.cmd U:\windows
  • press [ENTER]

The batch simply automates the Registry mods discussed.

They should work NO matter if the target USB install is updated or not. :dubbio:

:sos:
Wonko

#25 Wh1t3c0d3r

Wh1t3c0d3r

    Member

  • Tutorial Writer
  • 80 posts
  • Location:/usr/bin/php
  • Interests:I'm an enthusiast PHP programmer working as an IT technician (level 2) for a small company that create software.
    I love to help and teach things to people for free (if possible)
  •  
    Canada

Posted 02 May 2011 - 01:08 PM

Offline = NOT currently booted

Like "run the batch from a PE or another (USB stick/HD based) instance of Windows 7".

Or:

  • Boot your PC "normally" from internal HD
  • Insert the USB stick containing the USB based 7 that doesn't boot from USB anymore because of the 0x0000007b BSOD caused by the update
  • check that the USB drive containing \Windows\ directory gets letter U:
  • open a command prompt, navigate to where you put the set_7_usb_boot.cmd
  • type:
  • set_7_usb_boot.cmd U:\windows
  • press [ENTER]

The batch simply automates the Registry mods discussed.

They should work NO matter if the target USB install is updated or not. :dubbio:

:sos:
Wonko


Oh thanks. Does the file work on Windows XP? Because, my second system is Win XP.

Edit: My first system is Windows 7 and the second is Win xp. Use Win xp To patch Win 7?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users