How To
How To
How To
partition)
Contents
1. 1 Introduction
2. 2 Aim
3. 3 Equipment required:
4. 4 Method
5. 5 Booting the USB drive
6. 6 Pagefile relocation (virtual memory)
7. 7 ADDENDUM - Booting from a different system
8. 8 Troubleshooting
9. 9 Add USB 3.0 Drivers to an Offline Image by Using DISM
1. 9.1 Adding Intel USB 3.0 drivers
Introduction
Please note: This tutorial enables you to prepare a USB drive so that you can boot
directly to Windows 7 from the USB drive. So now you can try Windows 7 without needing to install
it onto your internal hard disk! IT WILL ONLY WORK ON A USB 2.0 PORT (see instructions at the
end of this page for instructions on how to add USB 3 drivers).
This tutorial does not make a Windows installer USB drive, it actually puts a copy of
Windows 7 onto a USB drive and makes it bootable. When you have made it, you can
boot from it as follows:
1. Connect the prepared external USB drive (hard disk or Flash drive) to the
target system (use a USB 2.0 port NOT a USB 3.0 port!)
2. Switch on the system
3. Select the USB drive as the boot device in the BIOS boot menu
4. Now allow the system to boot to Windows 7 directly from the USB drive.
- it does not matter what is on the internal hard disk of the target system, even if the
internal hard disk is broken/not working.
This tutorial as based on fujianabc's Reboot.pro forum post 'NT 6.x fast installer:
install Win7 directly to USB external drive' and his excellent scripts (now with reg
tweak by 'cdob' from reboot.pro -USBBootWatcher is no longer required). The
instructions in that forum post #1 & #2 and some of the prompts in the installer.cmd
file that fujianabc provides were however confusing and potentially dangerous (you
could accidentally corrupt your system drive) - so I have slightly modified his script
to make it clearer and easier to use. It also now automatically finds and uses the 3 files
that are needed from the MS WAIK, so you don't need to manually copy them first.
The instructions below assume that you have a USB drive (USB Hard Disk -
recommended, or USB Flash drive - slow!) and you want to install Windows 7 onto it
using a Windows 7 install DVD (or ISO file) as the source. You can use any 32/64-bit
mix - e.g. use a Windows 7 64-bit PC to install say Vista 32-bit OS from a Vista 32-bit
installation DVD onto a USB drive, or use a Windows XP system to install Windows
7 64-bit onto a USB drive using this method. Note that some CPUs' (e.g. some
netbook Atom 32-bit CPUs) won't run a 64-bit OS, so a 32-bit version of Windows 7
is usually best for these.
Note that there are some pitfalls with this Windows USB drive once you have
successfully made it:
You will need to activate Windows using a valid Product Key (which will be
locked to the hardware you booted it on) if you want a fully functional version
of Windows for over 30 days
You cannot just plug the USB drive into another system. If you want to move
it to another system (once you have booted it on one system) then you need to
sysprep it (see ADDENDUM at the end of this page). This is because on first
boot, a fresh copy of Windows will detect what hardware is on the system and
install the correct drivers (including the drivers for the boot drive). If you try
to boot that USB drive on another system without running Sysprep, you may
just get a BSOD (0x0000007B blue screen of death error).
No drivers are included in the image if a plain Windows installation DVD is
used as the source DVD. You will need to install drivers once Win7 is booting.
A USB Flash drive will be quite slow (1-2 hours!) to install and run Windows
from, unless you use a fast USB 3 Flash drive, such as BUSBI Boost USB 3
(even on a USB 2 port, USB 3 Flash drives are usually faster than USB 2
drives, but not, of course, as fast as a standard USB hard drive or USB 3
drives on USB 3 ports). I highly recommend you use a USB hard drive or a
USB 3 Flash drive.
Windows 7 does not contain many USB 3 compatible drivers - so if you try to
boot from a USB 3.0 port it will probably crash!
Alternatively - using this method, you could remove an internal hard drive from a
system, connect it to your main PC (either directly or using a USB drive caddy),
format it and install Windows onto it using the Installer.cmd script in the tutorial, and
then put the hard drive back into the original system (or a different system) and boot
it.
The procedure below works and has been tested using an ISO of the RTM/Gold
version of Windows 7 and the SP1 version of Windows 7.
Aim
To install a bootable Windows 7 (or Vista or Win2K8) OS onto an external USB
drive.
You need to follow this tutorial using a Windows PC (or possibly by booting to
WinPE v2 or v3).
The Windows files are taken from a source installation DVD or a mounted ISO file. If
you do not have a Windows 7 source DVD, you can download an ISO file (see
External Links page)
Equipment required:
1. A USB hard drive of at least 10GB NTFS formatted (which may be wiped
during this process). A Flash drive can be used but it will be slow!
2. The whole Microsoft WAIK for Windows 7 installed (or at least the files
bootsect.exe, bcdboot.exe and imagex.exe) or see Tutorial #83 for a method
of obtaining these files in about 30 seconds without needing to download and
install the whole WAIK.
3. The NT6_Fast_Installer.zip download from the Downloads page
4. A Windows 7 installation DVD (or ISO file which you can mount as a drive
letter) - see here to download a copy of Windows 7.
5. (optional) RMPrepUSB to partition the USB hard drive
The system you use is assumed to be a Windows 7 system, although if you install the
WAIK, these instructions should work on an XP system or later OS.
Method
1.You need to have a source DVD or a mounted ISO file (mounted as a drive letter). If
you only have an ISO file, you can use SlySoft Virtual Clone Drive or ImDisk or any
similar software to mount the ISO as a drive volume - e.g. O:. This allows the script to
access the files within the ISO file as a drive letter.
2. You may need to partition and format the target USB disk using RMPrepUSB
if it is not formatted as NTFS.
IMPORTANT: The USB disk volume must be formatted as NTFS and must be
allocated a drive letter by Windows.
Set RMPrepUSB settings 1 to 5, then click 6 Prepare Drive
If you already have the Windows 7 or Windows 8 WAIK installed, the 3 files needed
will be found and automatically copied to your C:\NT6Inst when you run the
Installer.cmd script.
6. You should now see a green window with some text. Hit Enter and the Enter
again.
7. Now find the Install.wim file on your Windows installation DVD (or mounted ISO
volume) - double-click to select it:
8. You will now be presented with a list of different Editions - these were all within
the Install.wim file that you selected, choose the one you want to install (remember
that you will need an activation key which matches the version you choose, if you
want to activate Windows).
9. Now you will be asked to select the target USB hard disk that you want to install
Windows onto:
Note: If the USB disk has files on it, the script will try to format it for you, you will
need to enter in the volume name to confirm this.
10. Now enter in the same USB drive letter again for the boot partition (use the same
USB drive letter again):
11. You will now be asked if the disk is a USB disk - answer Y.
If however, you intend to disconnect the drive and put the drive inside another
system (e.g. notebook) before you boot from it, then say No to this question.
12. Unless you have a Vista or Server 2k8 source DVD, you will be asked what drive
letter you want Windows to use when it boots from the USB drive. Use the default by
hitting Enter.
13. You will now be presented with a final summary screen - hit Enter to start the
installation and wait a while.
Check this carefully before you hit Enter!
Note that the Target Drive letters should be the same if your USB drive only has one
partition.
Installation completes in just 7 minutes for a USB 3.0 Hard Disk install
WARNING: If you have installed the 'Gold RTM' first version of Windows, do not
update the version with a Service Pack update (SP1) as this could break the
installation - instead re-install using the SP1 ISO/DVD. Normal hotfixes and updates
will be OK though.
A Sysprep cmd file should be already present on the Windows Desktop, once the
system has booted from the USB drive - if you right-click on this and Run as
Administrator it will reset and shutdown the system. You can then boot the USB
drive on a different system that has different hardware. This sysprep command should
run from an administrator command prompt and uses the
command: \Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown
Once the computer shuts down, you can boot the USB drive on a different system
which has different hardware. If you want to move it to another system again or back
to the first system, don't forget to run Sysprep again before you move it!
Troubleshooting
If the BCDBOOT command fails with a [0xC000003a] error Warning: Resource
files missing ... then you probably are running the Installed.cmd script on a Windows
system that has booted from a UEFI BIOS instead of an MBR BIOS. In this case
download bcdboot.exe from the Windows 8 WAIK and replace the version in your
C:\NT6Inst folder with the Windows 8 version and run Installer.cmd again.
If you are using a USB HDD drive and Windows 7 boots and shows a 'Performance
Options' form, this is due to having no page file. Windows will not create a page file
on a removable drive. If you have no internal disk available, you can create a page file
on the USB drive using this fix - see http://reboot.pro/9461/#entry86619.
The following instructions have not been tested by me and so I cannot vouch that
they will work!
Note: You will need to download and install the Windows 7 or 8 WAIK onto your
'office' computer first before you can run DISM.
Before you run Installer.cmd to make the USB drive, you first need to add the USB 3
drivers to the \sources\install.wim file.
First extract the install.wim file from the Windows 7 install ISO onto your hard disk
so that it can be modified.
It is suggested that you disable your antivirus software and close all Explorer
windows now.
An index or name value is required for most operations that specify a WIM file.
Type the following command to mount the offline Windows image contained in the
install.wim file (change the name value to exactly the name of the version you intend
to use, as listed).
Instead of using /Name:"xxx" you can use for instance /Index:2 (for image number
2)
At a command prompt, type the following command to add a specific driver to the
image. You will need to have the correct USB 3.0 Windows 7 driver files available for
the intended target system(s).
Multiple drivers can be added on one command line if you specify a folder instead of
an .inf file. To install all of the drivers in a folder and all its subfolders use the /recurse
option. For example,
Review the contents of the Windows\Inf\ directory in the mounted Windows image to
ensure that the .inf files were installed using Windows Explorer. Drivers added to the
Windows image are named Oem*.inf. This is to ensure unique naming for new drivers
added to the computer. For example, the files MyDriver1.inf and MyDriver2.inf are
renamed Oem0.inf and Oem1.inf.
At a command prompt, type the following command to commit the changes and
unmount the image.
I followed the steps at the end of your tutorial and was able to get the Intel USB 3.0
drivers added in to my install.wim image.
One word of caution: Disable antivirus during this process. It blocked Dism from making the
changes it needed to do.
I then was able to install to the USB HDD and it booted fine from USB 2.0
port. Unfortunately, Trying to boot from USB 3.0 port would still bluescreen.
I went into the registry after booting from USB 2.0 and changed:
and
for both of those entries, I changed "Start" to "0" and "Group" to "Boot
Bus Extender"
This will vary based on the USB3 driver in use, but this worked for the Intel USB3
drivers.
The tool can be downloaded from the link on this page - it can also be directly
downloaded from this site by clicking on this link.
Tick the options that you want and click the Download button. Once completed
(the Windows 7 option shown takes about 30-60 seconds), you will have a set of
folders located beneath the folder where the GetWaikTools.exe program was located.
Here are the WAIK4 (Win8 WAIK) files extracted (there will be 2 or 3 folders for
each WAIK version, x86, amd64 and sometimes ia64)
\ADK_8.0.SFV
\amd64
\DISM.SFV
\x86
\amd64\bcdboot.exe
\amd64\bcdedit.exe
\amd64\bootsect.exe
\amd64\Dism
\amd64\imagex.exe
\amd64\oscdimg.exe
\amd64\wimgapi.dll
\amd64\wimmount.sys
\amd64\WimMountInstall.exe
\amd64\wimserv.exe
\amd64\Dism\compatprovider.dll
\amd64\Dism\dism.exe
\amd64\Dism\dism.Format.ps1xml
\amd64\Dism\dism.psd1
\amd64\Dism\dism.psm1
\amd64\Dism\dism.Types.ps1xml
\amd64\Dism\dismapi.dll
\amd64\Dism\dismcore.dll
\amd64\Dism\dismcoreps.dll
\amd64\Dism\dismprov.dll
\amd64\Dism\folderprovider.dll
\amd64\Dism\imagex.exe
\amd64\Dism\imagingprovider.dll
\amd64\Dism\logprovider.dll
\amd64\Dism\Microsoft.Dism.Powershell.dll
\amd64\Dism\pkgmgr.exe
\amd64\Dism\ssshim.dll
\amd64\Dism\vhdprovider.dll
\amd64\Dism\wimgapi.dll
\amd64\Dism\wimmount.sys
\amd64\Dism\wimmountadksetup.exe
\amd64\Dism\wimprovider.dll
\amd64\Dism\wimserv.exe
\x86\bcdboot.exe
\x86\bcdedit.exe
\x86\bootsect.exe
\x86\Dism
\x86\imagex.exe
\x86\oscdimg.exe
\x86\wimgapi.dll
\x86\wimmount.sys
\x86\WimMountInstall.exe
\x86\wimserv.exe
\x86\Dism\compatprovider.dll
\x86\Dism\dism.exe
\x86\Dism\dism.Format.ps1xml
\x86\Dism\dism.psd1
\x86\Dism\dism.psm1
\x86\Dism\dism.Types.ps1xml
\x86\Dism\dismapi.dll
\x86\Dism\dismcore.dll
\x86\Dism\dismcoreps.dll
\x86\Dism\dismprov.dll
\x86\Dism\folderprovider.dll
\x86\Dism\imagex.exe
\x86\Dism\imagingprovider.dll
\x86\Dism\logprovider.dll
\x86\Dism\Microsoft.Dism.Powershell.dll
\x86\Dism\pkgmgr.exe
\x86\Dism\ssshim.dll
\x86\Dism\vhdprovider.dll
\x86\Dism\wimgapi.dll
\x86\Dism\wimmount.sys
\x86\Dism\wimmountadksetup.exe
\x86\Dism\wimprovider.dll
\x86\Dism\wimserv.exe
GetWailTools.exe can also be run from the command line and so can be used in
Windows batch files - e.g. to get all WAIK files...
If you need to add extra components to the winpe.wim (e.g. languages, wmi support,
scripting support, .Net, etc.) then you will need to download and install the whole
WAIK.