How to fix ?: Booting Windows 7 x64 from usb: STOP 0x0000007B

I am now very close to booting Windows 7 x64 from USB stick.

I use qemu-img and win32diskwriter to convert vmdk to img and then write it to usb stick.

I also used testdisk tool to discover what is on usb stick to make sure I d on't overwrite the wrong one.

More about these tools and their links later.

However now I am facing a problem with this blue-screening of windows.

From what I can gather from google and such is that this error is caused by the following reason:

  1. Windows boots from USB device initially.

  1. Then it tries to load the kernel, the kernel unloads/rescans for usb dev ices.

  2. Somehow this looses a connection with usb or somehow it can't load usb d river

and it blue screens.

Also somehow tools like rufus and wintousb fix this stop error ?!

I need to know how they fix this error so I can also write IMG files to usb sticks and run windows like that instead of performing installs to usb sti cks, which probably also doesn't work for same reason or limitations in win dows installer, windows does not install to usb stick under normal circumst ances, plus updating safely in vmware or so or other vm operations is nice.

So now I need a way to fix this error stop 0x0000007b which also means no a ccess to boot device or something.

I suspect I have to add some kind of usb driver to windows or maybe even th e integrated windows iso I made, however re-installing windows would be a c hore... so I need an option/fix to fix an existing windows 7 installation.

Also windows update for windows 7 might not be available for much longer, n ot sure when microsoft will seize support, officially it should have alread y ended, but maybe they going to make it a bit longer cause they just found a big NSA informed vunerability in crypt32.dll or something.

Kinda funny on the day they stop supporting windows 7 ?!

Was this perhaps a little hint from NSA that they want microsoft to continu e supporting windows 7 for a little while longer ? Hmmm.

Meanwhile I am going to search google for a solution, cause this issue is a ll over the internet apperently, so I am hopefully of finding a fix... don' t hestitate to post a fix though =D

Bye for now, Skybuck.

P.S.: Having a portable windows 7 x64 would be quite cool and handy from ti me to time ! ;) =D This is somewhat I definetly want in case a computer f ucks up somehow.

Reply to
skybuck2000
Loading thread data ...

I found a nice tutorial, it seems to known what it's talking about, so I am going to try and follow it:

formatting link

There are also tools already mentioned by Paul that claim they can also do some of it, might be worth investigating if tutorial above fails:

Apperently WinToUsb is not only for ISO's but also for VHD unfortunately not VMDK, but might be possible to convert to VHD, however I am not sure if VHD can support multi paritions properly, and windows does use at least two partitions.

Going to collect links for further future investigation down below:

Some unbuntu ionformation that may also apply to windows, has links to other tools like netbootin:

formatting link

Some tool, claiming cloning capabilities:

formatting link

Some information about windows to go drivers, I am fuzzy about this:

formatting link

A thread about wintousb and some kind of issue he runs into:

formatting link

From the tutorial above, some tool with scripts and such:

formatting link

The wintousb tool mentioned by Paul, it does have a free version but also a payed version:

formatting link

Fow now I am kinda done with these tools claiming to do all kinds of things with little success, first I will try the above tutorial to see if messing with windows will make it work.

Cause I already did the installation, conversion, burning to usb, just need to fix it, don't need to re-do all of that.

Something that would be working/compatible with vmware would be very nice.

Bye for now, Skybuck.

Reply to
skybuck2000

OK, I read the tutorial, skipped over some sections like the WAIK (automate d installation) and such.

This tutorial seems to be mostly about modifieing or augmenting ISO/CD's an d installing Windows from ISO/CD/DVD.

This is not what I want, I also watch the youtube video and it's about the same thing. This tutorial might still be usefull as a last resort.

However inspecting the cmd files and such and reading the tutorial did come up with something interesting how this is slightly done when booting on ot her computers, something called "sysprep" a build in command in windows:

There is a Microsoft website about it, the command used is in the cmd file is:

%SystemRoot%\System32\sysprep\sysprep.exe /oobe /generalize /shutdown

formatting link

I will read up further about this, in short this prepares windows for runni ng on another computer, removes device setup, keeps device drivers.

It seems also aimed at virtualizing windows somewhat.

It also mentions this can only be done 8 times.

I will try out this command in VMWare image copy of windows and then burn i t back to usb to see if this fixes anything.

I think not but it might be worth a shot.

But first I will read the other commands to see if there is anything else u sefull in there.

Somewhat rufus and wintousb get this working and I want to know how they ma ke this working.

Maybe it's just a simply sysprep, but maybe there is more involved.

Text from sysprep website:

" Sysprep (Generalize) a Windows installation

05/02/2017 4 minutes to read +2

To deploy a Windows image to different PCs, you have to first generalize th e image to remove computer-specific information such as installed drivers a nd the computer security identifier (SID). You can either use Sysprep by it self or Sysprep with an unattend answer file to generalize your image and m ake it ready for deployment. Generalize a Windows installation

When you generalize a Windows image, Windows Setup processes settings in th e generalize configuration pass. Even if you're capturing an image that's g oing to be deployed to a PC with similar hardware, you still have to genera lize the Windows installation to remove unique PC-specific information from a Windows installation, which allows you to safely reuse your image.

When you generalize an image, Windows replaces the computer SID only on the operating system volume where you ran Sysprep. If a single computer has mu ltiple operating systems, you must run Sysprep on each image individually.

If you're generalizing a Windows Server installation that has Remote Authen tication Dial-In User Service (RADIUS) clients or remote RADIUS server grou ps defined in the Network Policy Server (NPS) configuration, you should rem ove this information before you deploy it to a different computer. For more information, see Prepare a Network Policy Server (NPS) for Imaging. Prevent Sysprep from removing installed devices

When you set up a Windows PC, Windows Setup configures all detected devices . Generalizing a Windows installation uninstalls configured devices, but do es not remove device drivers from the PC.

If you're deploying an image to computers that have identical hardware and devices as the original PC, you can keep devices installed on the computer during system generalization by using an unattend file with Microsoft-Windo ws-PnPSysprep | PersistAllDeviceInstalls set to true. For more information about Sysprep-related Windows unattend components, see the Unattended Windo ws Setup Reference for Microsoft-Windows-PnpSysprep. Limits on how many times you can run Sysprep

You can run the Sysprep command up to 8 times on a single Windows image. Af ter running Sysprep 8 times, you must recreate your Windows image. In previ ous versions of Windows, you could use the SkipRearm answer file setting to reset the Windows Product Activation clock when running Sysprep. If you ar e using a volume licensing key or a retail product key, you don't have to u se SkipRearm because Windows is automatically activated. Microsoft Store apps

Installing new Microsoft Store apps or updating your existing Microsoft Sto re apps before generalizing a Windows image will cause Sysprep to fail. Sys prep /generalize requires that all apps are provisioned for all users; howe ver, when you update an app from the Microsoft Store, that app becomes tied to the logged in user account. The following error appears in the Sysprep log files (located at %WINDIR%\System32\Sysprep\Panther):

was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

Instead of using the Microsoft Store to update your apps, you should sidelo ad updates to your line-of-business apps, provision offline-licensed Micros oft Store for Business apps for all users, or have end-users update their a pps by using the Microsoft Store on their destination PCs. If Microsoft Sto re access in a managed environment is disabled by an IT administrator, end- users will not be able to update the Microsoft Store apps.

For more information about sideloading line-of-business Microsoft Store app s, see Sideload Apps with DISM and Customize the Start Screen. Generalize an image Generalize from Audit Mode

To generalize an image, you have to first boot into Audit Mode. You can boo t into Audit Mode using an unattend file or from the Out-Of-Box Experience (OOBE) screen. You can read about the different ways of booting into Audit Mode at Boot Windows to Audit Mode or OOBE.

Boot a PC into Audit Mode. When Windows boots into Audit Mode, System P reparation Tool will appear on the desktop. You can choose to either close the System Preparation Tool window or allow it to remain open.

Customize Windows by adding drivers, changing settings, and installing programs. Do not install any Microsoft Store apps using the Microsoft Store .

Run Sysprep.

If the System Preparation Tool window is still open, click Generali ze, click Shutdown, and then click OK to generalize the image and shut down the PC.

-or-

Use Sysprep from Command Prompt. Run %WINDIR%\system32\sysprep\sysp rep.exe to open the System Preparation Window. You can also use the Sysprep command together with the /generalize, /shutdown, and /oobe options. See S ysprep command-line options to see available options.

%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe

Note

If you are generalizing a VHD that will be deployed as a VHD on the same virtual machine or hypervisor, use the /mode:vm option with the Syspr ep command-line.

The computer generalizes the image and shuts down.

After the computer shuts down, capture your image with DISM.

Deploy this image to a reference computer. When the reference computer boots, it displays the OOBE screen.

Generalize using unattend

If you use multiple unattend files during your computer deployment, you can add the following settings to your each of your unattend files so Windows Setup will generalize the PC after processing the unattend file.

To automatically generalize the image and shut down, use the Microsoft- Windows-Deployment | Generalize setting. Set Mode to OOBE or Audit, and set ForceShutdownNow to true.

-or-

To generalize the system, and have it boot into Audit Mode, use the Mic rosoft-Windows-Deployment | Reseal setting to the oobeSystem configuration pass. Set Mode to Audit. "

Bye for now, Skybuck.

Reply to
skybuck2000

Oh there is one more webpage involved:

Booting windows in audit mode, it might be necessary to do so for sysprep, not sure yet, probably though cause it was on command line:

formatting link

" Boot Windows to Audit Mode or OOBE

05/02/2017 5 minutes to read +1

You can use audit mode to customize your computer, add applications and dev ice drivers, and test your computer in a Windows environment. Booting to au dit mode starts the computer in the built-in administrator account. Windows

on pass. After you configure a computer to boot to audit mode, the computer will continue to boot to audit mode by default until you configure the com puter to boot to Out-Of-Box Experience (OOBE) when the computer ships to th e user.

If a password-protected screen saver starts when you are in audit mode, you cannot log back on to the system. The built-in administrator account that is used to log on to audit mode is immediately disabled after logon. To dis able the screen saver, either change the power plan through Windows Control Panel or configure and deploy a custom plan. For more information, see Cre ate a Custom Power Plan. Boot to audit mode automatically on a new installation

To configure Windows to boot to audit mode, add the Microsoft-Windows-D eployment | Reseal | Mode = audit answer file setting.

When Windows completes the installation process, the computer boots int o audit mode automatically, and the System Preparation (Sysprep) Tool appea rs. For more information about using the Sysprep tool in audit mode, see Sy sprep (Generalize) a Windows installation.

Note Settings in an answer file from the oobeSystem configuration pas s do not appear in audit mode. For more information about which answer file settings are processed when you boot to audit mode or OOBE, see How Config uration Passes Work.

Boot to audit mode manually (on a new or existing installation)

At the OOBE screen, press CTRL+SHIFT+F3.

Windows reboots the computer into audit mode, and the System Preparatio n (Sysprep) Tool appears.

Note The CTRL+SHIFT+F3 keyboard shortcut does not bypass all parts of the OOBE process, such as running scripts and applying answer file setting s in the oobeSystem configuration pass.

Boot to OOBE automatically on a new installation

To configure Windows to boot to OOBE, add the Microsoft-Windows-Deploym ent | Reseal | Mode = oobe answer file setting.

If you have configured your Windows image to boot to OOBE, but then you need to make further configurations to your image in audit mode, see Modif y an existing image that is configured to boot to OOBE.

Modify an existing image that is configured to boot to OOBE

If you have configured your Windows image to boot to OOBE, but then nee d to make further configurations to your image in audit mode, you can do on e of the following:

Use the CTRL+SHIFT+F3 keyboard shortcut. The computer will reboot i nto audit mode.

This option may trigger any scripts that you have configured to lau nch in OOBE.

-or-

Mount the image, add an answer file with the audit setting, and sav e it as C:\test\offline\Windows\Panther\Unattend\Unattend.xml. This may req uire overwriting an existing answer file at this location.

On the next boot, Windows will boot directly into audit mode.

Boot to audit mode automatically from an existing image

Create a new answer file, and then add the Microsoft-Windows-Deployment | Reseal | Mode = audit setting. Save the answer file as Unattend.xml.

At an elevated command prompt, mount the Windows image. For example:

Dism /Mount-Image /ImageFile:C:\test\images\MyImage.wim /index: /MountDir:C:\test\offline

where is the number of the selected image on the .wim file.

Copy the new answer file to the C:\test\offline\Windows\Panther\Unattend fo lder.

Commit the changes, and then unmount the image. For example:

Dism /Unmount-Image /MountDir:C:\test\offline /commit

When the image is applied to the destination computer and Windows is bo oted, the computer boots into audit mode automatically, and the Sysprep too l appears. For sample procedures, see Step 1: Transfer an image to a differ ent computer and Step 2: Prepare the computer for a customer in Deployment examples.

Options for applying an image also include using answer file settings, such as specifying the image to install and the disk configurations to make on the destination computer. For more information, see the Unattended Windows Setup Reference Guide. Deployment examples

To transfer an image to a different computer, you must first remove the com puter-specific information from the configured computer by generalizing the image with the Sysprep tool. To prepare a computer for the customer, you m ust generalize the computer, and then set it to boot to OOBE when a custome r starts the computer for the first time. In the following examples we crea te and transfer a reference image to a different computer, and then create a model-specific image that ships to a customer.

Step 1: Transfer an image to a different computer

Install Windows on a reference computer.

After the installation is complete, boot the computer and install any a dditional device drivers or applications.

After you update the Windows installation, run Sysprep:

At the command line, run the Sysprep /generalize /shutdown command.

-or-

In the System Preparation Tool window, select the Generalize check box under the System Cleanup Action box on the Shutdown Options box, select Shutdown, and then click OK.

Sysprep removes system-specific data from the Windows installation. Sys tem-specific information includes event logs, unique security IDs (SIDs), a nd other unique information. After Sysprep removes the unique system inform ation, the computer shuts down.

After the computer shuts down, insert the Windows PE USB flash drive or other bootable media, and reboot into Windows PE.

In the Windows PE session, capture the reference image by using the Dis m /capture-image command.

Proceed to the next step to create a model-specific reference image.

Step 2: Prepare the computer for a customer

Install the reference image you created in Step 1 that is destined for your customer.

After you update the Windows installation, at the command line run the Sysprep /audit /generalize /shutdown command to configure Windows to boot t he computer to audit mode. You can then capture the Windows image by bootin g to another partition or by using Windows PE.

Use the new model-specific reference image to install Windows on a new computer. The Windows image is applied to the computer, and Windows boots t o audit mode.

(Optional) You can install additional applications and other updates ba sed on a customer's order. You can also test the computer to verify that al l components are working correctly.

After you update the Windows installation, run the Sysprep /oobe /shutd own command.

Note If you install Windows images by using the Sysprep /generalize / oobe command, the user experience will not be ideal. On the next reboot aft er you run the Sysprep /generalize /oobe command, Windows runs the speciali ze configuration pass, Plug and Play, and other Setup tasks before Windows starts OOBE. This process can take additional time and can delay a customer 's first logon.

Package and deliver the computer to your customer.

When the customer starts the computer, OOBE runs. "

Bye, Skybuck.

Reply to
skybuck2000

I thought about it some more and it don't make sense, more is involved, cause windows 7 boots, then disables usb and loses connection, investigating into the cmd files I found some more commands are used, this one looked interesting:

rem

formatting link
rem Deploying Microsoft Hyper-V Server 2008 R2 on USB Flash Drive rem
formatting link
reg.exe add %Control%\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 30000 rem Loads VHD, SD, and USB boot drivers. reg.exe add %Control% /f /v BootDriverFlags /t REG_DWORD /d 0x6

Googling the bottom command leads to this page:

formatting link

The guy writes the following, in short:

Windows 7 did have build-in windows to go but was never activated, these commands seem to active it, his original post:

Also contains links to tools that also might help.

"

This question is similar to Can I install Windows OS (Windows 7) on a removable USB hard drive?

With Windows 7 SP1, there is an easier way to install Windows 7 to a USB Hard Disk or USB Flash Drive.

This was discovered by cdob at Reboot

formatting link

It boils down to two registry keys, which i think are present in Windows 8 to enable Windows To Go feature. I guess this feature was present in Windows 7, but was never activated.

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

You can install Windows 7 to a USB Hard Disk or Flash Drive using a Tool called WinNTSetup which I have mentioned here Is there an equivalent to Windows To Go for personal use? This tool uses the above registry settings to enable Windows To Go in Windows 7

This tool is easy to use and you quickly install Windows 7 your USB Hard Disk. This tool also allows to create VHD (Virtual Hard Disk) on your USB Drive and install Windows 7 to the VHD on the USB Drive.

This installation will be persistent.

More information in the below links.

formatting link

formatting link
"

Bye, Skybuck.

Reply to
skybuck2000

The following solution below fixes the stop 0x0000007b usb boot problem for windows 7:

It basically enables usb drivers during boot process:

Save the text below starting from " to a file called set_7_usb_boot.cmd:

Then run it on the non-running windows installation to be fixed for usb boot problem:

set_7_usb_boot X:\windows

where X is the window installation to be fixed.

"

@echo off setlocal EnableExtensions EnableDelayedExpansion pushd %~dp0

rem set_7_usb_boot.cmd v0.02 rem created by cdob echo prepare offline windows 7 registry, set USB boot drivers &echo.

set System_Root=\Windows if not %1.==. set System_Root=%1

if not exist "%System_Root%\system32\config\system" set /P System_Root=Path to your SystemRoot folder on usb drive (e:\Windows): if not exist "%System_Root%\system32\config\system" (echo Error: target not found &pause &popd &goto :eof)

copy "%System_Root%\system32\config\system" "%System_Root%\system32\config\system_%random%.sav" reg.exe load HKLM\loaded_SYSTEM "%System_Root%\system32\config\system"

set ControlSetDefault= call :setReg Default call :setReg LastKnownGood

reg.exe unload HKLM\loaded_SYSTEM popd

goto :eof

:setReg set ControlSet=001 reg.exe query "HKLM\loaded_SYSTEM\Select" /v "%1" >nul 2>&1 && ( for /f "skip=2 tokens=3" %%a in ('reg.exe query "HKLM\loaded_SYSTEM\Select" /v "%1"') do set /a ControlSet=%%a set ControlSet=000!ControlSet! ) set ControlSetNNN=ControlSet%ControlSet:~-3% if %ControlSetDefault%.==%ControlSetNNN%. goto :eof echo. &echo ControlSet "%ControlSetNNN%" used.

set Services=HKLM\loaded_SYSTEM\%ControlSetNNN%\Services set Control=HKLM\loaded_SYSTEM\%ControlSetNNN%\Control

rem

formatting link
rem Deploying Microsoft Hyper-V Server 2008 R2 on USB Flash Drive rem
formatting link
reg.exe add %Control%\PnP /f /v PollBootPartitionTimeout /t REG_DWORD /d 30000 rem Loads VHD, SD, and USB boot drivers. reg.exe add %Control% /f /v BootDriverFlags /t REG_DWORD /d 0x6

set ControlSetDefault=%ControlSetNNN% goto :eof "

Bye, Skybuck.

Reply to
skybuck2000

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.