USB HDD boot and Windows 7 SP1
#1
Posted 28 March 2011 - 04:15 PM
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!
#3
Posted 28 March 2011 - 04:35 PM
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
Posted 28 March 2011 - 04:54 PM
Agreed, but when you installed SP1, something is likely to have been overwritten....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:
Also, once you get a BSOD, you should check ControlSet001 but also ControlSet002. Maybe I'm just going in the wrong direction though
#6
Posted 28 March 2011 - 05:48 PM
I was unsure and I checked both.check ControlSet001 but also ControlSet002
Before I formatted my first w1sp1 installation I tried this tool as some user suggested. no luckThis might help you. It explicitly says:
Do you have SP1 working?
Do somebody here can say that he have working SP1 booting from USB?
#7
Posted 29 March 2011 - 11:39 AM
I haven't tried it myself, but amalux says he has SP1 booting from USB:Do somebody here can say that he have working 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
Posted 01 April 2011 - 09:22 AM
Raz
#9
Posted 01 April 2011 - 12:59 PM
#10
Posted 01 April 2011 - 02:15 PM
#11
Posted 11 April 2011 - 07:22 PM
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
Posted 28 April 2011 - 11:49 AM
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
Posted 28 April 2011 - 03:07 PM
#14
Posted 28 April 2011 - 06:08 PM
Use manufacturer hack:After booting another system (Win7PE, Win7 from fixed disk) it is necessary to set the Start parameter
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
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
Posted 28 April 2011 - 07:03 PM
I don't know.how do I know that Windows 7
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
Posted 29 April 2011 - 09:21 AM
Hi cdob,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
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
Posted 01 May 2011 - 04:31 PM
Which hardware do you use?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
BootDriverFlags does load marked drivers
VHD drivers are loaded[HKEY_LOCAL_MACHINE\usb\ControlSet001\services\usbehci]
"BootFlags"=dword:00000004
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
That's before 7 SP1. Windows 6.1 does boot from USB at native level.Release Date Nov 16 2009
Deploying Microsoft Hyper-V Server 2008 R2 on USB Flash Drive
http://technet.micro...893(WS.10).aspx
Try 30000.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
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:00000000USB booting is integrated since several years, but disabled by default.
Does another hardware gives different results?
#19
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
Posted 01 May 2011 - 06:07 PM
To clarify:When I create the VHD system I only apply install.wim and not both boot.wim and install.wim.
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
Posted 01 May 2011 - 06:07 PM
Oh no.
I'm such a Blödmolli (German word for dweeb, dimwit or whatever)
I made such a bad mistake, unbelievable.
On the other side, my fault was well documented in post #17 at 2)
And no one did notice it.
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.
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.
After setting the correct two registry keys everything went just perfect.
The USB booted system also survived KB982018 and several reboots afterwards.
And only two registry keys need to be set.
I wonder why Microsft has two different USB stacks in their embedded environment?
Many thanks cdob!
Many Greetings
MichaelZ
#22
Posted 01 May 2011 - 07:20 PM
Thanks for report.After setting the correct two registry keys everything went just perfect.
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
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 windowsset_7_usb_boot.cmd U:\windows
What do you mean by offline? It as the update or not?
#24
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.
Wonko
#25
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.
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