Create a Bootable USB Flash Drive (Standard 7 SP1)
7/8/2014
If your device has a bootable DVD-ROM drive, you can use the Windows Embedded Standard 7 DVD that is appropriate to your device architecture as a bootable disk. If your device does not have a bootable DVD-ROM drive, you need to create a bootable USB Flash Drive (UFD) so that you can capture or extract an image on a device, start Image Builder Wizard on a device, or start your device using Windows Preinstallation Environment (Windows PE) 3.0. Once you have started a device with Standard 7 or Windows PE, you can run Target Analyzer or build an image using an answer file. If you prefer, you can create an image of needed files and then Create a Bootable CD-ROM instead of a bootable UFD.
Hardware and Software Assumptions
- You have a reference device that meets the Requirements for an Embedded Device. A reference device has the same hardware configuration as a typical device onto which you will install Standard 7.
- You have installed Windows Embedded Standard 7 Toolkit on a development computer that meets the Requirements for a Development Computer.
- You have the set of three Standard 7 DVDs or access to their contents on other media, such as a network share.
- You have Windows Preinstallation Environment (Windows PE) 3.0 on your development computer. Windows PE versions prior to version 3.0 cannot be used for this process.
- You have the version of the DiskPart tool provided by both Windows 7 and Windows PE, which supports the partitioning and formatting of a UFD as a bootable device. Previous versions of the DiskPart tool do not support partitioning and formatting a UFD to be bootable.
- You have a blank UFD that you can format that is at least 2 GB (4 GB recommended).
Overview of Steps
In the following steps, you will create a temporary directory to collect all the files and folders necessary to make a bootable UFD, make the UFD bootable, and then copy those files to it.
- Step 1: Gather Required Files for a Bootable Disk
Collect the files needed to make a disk bootable.
- Step 2: (Optional) Gather Additional Files
Collect additional files and folders that you want on your bootable disk, such as the ImageX tool used for working with image files.
- Step 3: Make the UFD Bootable
Partition and format your UFD so that it can be used as a bootable disk.
- Step 4: Copy Files to the Bootable UFD
Copy the files and folders from previous steps to your bootable UFD.
Step 1: Gather Required Files for a Bootable Disk
A bootable disk must contain the files for an installation of Windows PE. If the storage drive of your device is not visible in Windows PE, the bootable disk should also contain a compatible driver.
Optionally, you might want to customize the installation of Windows PE that you plan to include on your bootable utility disk. For more information, see Create a Custom Windows PE Image.
To gather required files for a bootable disk
On the development computer, on the Start menu, point to All Programs, point to Windows Embedded Standard 7, right-click Windows PE Tools Command Prompt, and then select Run as administrator.
A Windows PE Tools Command Prompt window opens.
At the command prompt, run the Copype.cmd script by typing the following, replacing <device_arch> with either
x86
oramd64
and replacing <temp_directory> with a temporary directory where you can gather the files and folders to be used for your bootable disk:copype.cmd <device_arch> <temp_directory>
The script creates the following directory structure and copies all the necessary files for that architecture, for example:
\bootdisk \bootdisk\ISO \bootdisk\mount
Warning
If the temporary directory already exists, you will receive an error message.
Copy the base image (Winpe.wim) from the temporary directory to the ISO\sources directory and rename the file to Boot.wim by typing the following, replacing <tempdir> with the temporary directory you previously created:
copy <temp_directory>\bootdisk\winpe.wim <temp_directory>\bootdisk\ISO\sources\boot.wim
If you have created a custom Windows PE image for the bootable disk, replace the Boot.wim image file in the ISO\sources directory with your custom Windows PE image file by typing the following, replacing <wims_directory> with the directory your wim file is located in and <wimfile> with the full name of your image file, replacing <temp_directory> with the temporary directory you previously created:
copy <wims_directory>\<wimfile> <temp_directory>\bootdisk\ISO\sources\Boot.wim
For example, if the custom Windows PE image is named Mywinpe.wim and it resides in the MyWims directory on the C drive, then at the command prompt, type the following:
copy C:\MyWims\Mywinpe.wim C:\bootdisk\ISO\sources\Boot.wim
For more information, see Create a Custom Windows PE Image.
If your device does not have a DVD-ROM drive, you must copy the Image Builder Wizard files from the Standard 7 DVD appropriate to the device architecture to a location that your device can access, such as a UFD or a network share. For more information, see Relocate the Image Builder Files.
Step 2: (Optional) Gather Additional Files
On the development computer, gather optional files and folders that you might want on your bootable utility UFD and copy them to a directory under the ISO directory in the temporary directory you created earlier. Examples of optional files include ImageX for working with image files, Target Analyzer Program for finding hardware dependencies, and device drivers. For more information, see Gather Optional Files for a Bootable Disk.
Step 3: Make the UFD Bootable
Partition and format your UFD so that it can be used as a bootable disk.
To make the UFD bootable
From a Windows 7 or Windows PE environment, run the DiskPart tool. For example, at the command prompt, type the following:
diskpart
Use the DiskPart tool to determine the disk number and device size that you want to use for the next step by typing the following at the DiskPart command prompt:
list disk
Use the DiskPart tool to partition and format the device and make it bootable by typing the following, replacing <disk_number> with the number of the disk to partition and format:
select disk <disk_number>
(Optional) If the disk is offline, type the following at the DiskPart command prompt to bring the disk online. If the disk is already online, you can skip this command.
online disk
Type the following commands at the DiskPart command prompt, replacing <device_size> with the capacity of the UFD (in MB).
clean create partition primary size=<device_size> select partition 1 active format fs=ntfs quick assign exit
The UFD is now bootable.
Step 4: Copy Files to the Bootable UFD
Copy all the files and folders in the ISO directory of the temporary directory you created earlier to the UFD by typing the following, replacing <temp_directory> with your temporary directory and <UFD_drive> with the drive letter of your UFD drive:
xcopy <temp_directory>\iso\*.* /s /e /f <UFD_drive>:\
See Also
Tasks
Gather Optional Files for a Bootable Disk
Create a Bootable CD-ROM
Relocate the Image Builder Files