quenga.net - windows & application deployment – remote management – scripting & automation – and more…

Bootable UFD,Ghost,Imaging,USB Flash Drive

June 20, 2011

Create a Bootable WinPE 3.0 USB Flash Drive with Tools

Tags: ,

This article describes how to make a bootable USB flash drive (UFD) and how to add utilities to it.

You will need the following; technician computer running Windows 7 SP1 with the Windows Automated Installation Kit for Windows 7 SP1 installed.  Access to any device drivers and tools you want to include.

Following this article, I made a bootable USB flash dive with the Dell PE driver set, Ghost tools, AIK tools, and PS tools.  The amount of space used on the USB flash drive was under 200MB.

For the most part the destination folders are just suggestions; you can name them anything you want on any drive you want, just remember where you put it.

When you boot using this USB flash drive, the image is loaded into memory and is assigned the drive letter X:

Step 1: Create a bootable USB drive

Open a command prompt with administrative rights, and run diskpart. Then execute the following commands.

When you run list disk you will see a list of all the disks connected to your computer.  For the next command, select disk, replace the # sign with the number of the disk you want to work with.

And, yes.  This will destroy your drive so make sure you pick the proper one.

list disk
select disk #
clean
create partition primary
select partition 1
active
format quick fs=fat32
assign
exit

At this point the USB drive is setup to be bootable but still needs a boot image.

If you have another bootable USB drive and just want to copy it, just copy its contents to this USB drive and you’re done.

Step 2:  Create Windows PE image

This step requires the Windows Automated Installation Kit (WAIK) for Windows 7.  Once the WAIK is installed, continue.

Launch the Deployment Tools Command Prompt as administrator, and run the copype.cmd script.

copype.cmd x86 c:\winpe_x86

To make a 64 bit build, replace x86 with amd64 (for regular 64 bit), or ia64 for itanium processors.  We’re going to stay with good old 32 bit for now.

Step 3:  Add device drivers to the Windows PE image

This step uses the Deployment Image Servicing and Management (DISM ) tool and the Dell WinPE 3.0 driver CAB.

Download the Dell WinPE 3.0 driver CAB and extract the drivers to c:\drivers.
(C:\Drivers\Dell-WinPE-Drivers-A06\winpe\…)

Open a command prompt with administrative rights, and mount the image using DISM
(enter the command on one line)

dism /Mount-WIM /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount

Add the drivers to the image.  The /recurse options will query all subfolders.
(enter the command on one line)

dism /image:C:\winpe_x86\mount /Add-Driver /driver:C:\Drivers\Dell-WinPE-Drivers-A06\winpe\x86 /recurse

If your adding drivers to a 64 bit image, you must add the /ForceUnsigned option to the end of the command above.  If you do not add this option, unsigned drivers will not load as a 64 bit image requires the drivers to have a digital signature.  Adding this option to a 32 bit image has no effect as a 32 bit image does not require the drivers to be signed.

Note:  The current Dell WinPE 3.0 driver cab at the time of writing was A06 (27 July 2011) and loads 15 network and storage drivers for a 32 bit image.

Unmount the image to save the changes
(In the next step you may need to mount the image again.  Quickly read the next step to determine if you will remount the image.  If you will remount the image then there is no need to unmount it now, just continue.)

Close any Windows Explorer windows that may be open to; C:\winpe_x86, or any of its subdirectory’s.

dism /unmount-wim /Mountdir:c:\winpe_x86\mount /commit

Step 4:  Adding Ghost and other Tools

You can add tools in two different ways.  The tools can be part of the image or you can add the tools to the free space on the USB drive.

If you put your tools in the image the tools will be loaded into memory, so you still have access to them if you remove the USB drive. But, amount of tools and extra programs you load here is dependent on the amount of RAM in your target computer, and you will need to remount the image using DISM or imagex to service (update) the tools.  To access the tools just stay on the X: drive.

If you put the tools in the free space on the USB drive, servicing the tools is as easy as drugging and dropping.  But, if you remove the USB drive you will no longer have access to the tools and some tools will stop working – because the tool can’t see it’s excitable or can’t write a log, for example.  To access the tools you’ll have to find the drive mount for the USB flash drive.  I’ve found it to mount as drive E: or F: in most cases, but this is dependent on the amount of drives attached to your computer.

When it comes to loading tools…You can always use both methods.

Here we will add the tools to the image.

Open a command prompt with administrative rights, and mount the image using DISM
(if you unmounted it at the end of the last step – enter the command on one line)

dism /Mount-WIM /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount

Using Windows Explorer (My Computer) navigate to the mounted image

C:\winpe_x86\mount

Drag and Drop any tools you want here.  This will be the C: drive.

If you put your tools in the Programs Folder it will look cleaner but you will need to drill down to your tools to run them.

Ghost Tools

From the Ghost server copy;

AIBuilder.exe
ghost32.dmp
ghost32.exe
Ghostexp.exe
GhostSrv.exe

Other Tools

PSTools

Windows AIK Tools

From C:\Program Files\Windows AIK\Tools\x86
(Remember to Copy, don’t move them)

DaRT from MDOP

Add anything else (like the scripts to automatically start ghost)

Close any Windows Explorer windows that may be open to; C:\winpe_x86, or any of its subdirectory’s.

Unmount the image to save the changes

dism /unmount-wim /Mountdir:c:\winpe_x86\mount /commit

 

Step 5:  Copy the image to the USB drive

Copy the winpe.wim to the ISO directory as boot.wim

copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim

 

Copy the continence of the ISO directory to the USB drive.

xcopy C:\winpe_x86\iso\*.* /e F:\

 

Where F: is the USB drive

Safely remove the USB flash drive.

Reference

Walkthrough: Create a Bootable Windows PE RAM Disk on a USB Flash Disk
http://technet.microsoft.com/en-us/library/dd744530(WS.10).aspx

Building a Technician Computer
http://technet.microsoft.com/en-us/library/dd744246(WS.10).aspx

Windows Automated Installation Kit for Windows 7
http://technet.microsoft.com/en-us/library/dd349343(WS.10).aspx

The Windows® Automated Installation Kit (AIK) for Windows® 7
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34&displaylang=en

Windows AIK for Windows 7 SP1 Released
http://blogs.technet.com/b/mniehaus/archive/2011/02/17/windows-aik-for-windows-7-sp1-released.aspx

The Windows® Automated Installation Kit (AIK) Supplement for Windows® 7 SP1
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0aee2b4b-494b-4adc-b174-33bc62f02c5d

Add a Device Driver to an Offline Windows PE Image
http://technet.microsoft.com/en-us/library/cc749350%28WS.10%29.aspx

Dell Business Client Operating System Deployment
http://www.delltechcenter.com/page/Dell+Business+Client+Operating+System+Deployment+-+The+.CAB+Files

PSTools
http://technet.microsoft.com/en-us/sysinternals/bb896649

Sorry, the comment form is closed at this time.