Having familiarised myself with building answer files and sysprep’ing reference machines I’ve recently been experimenting with WinPE, ImageX and DISM to acquaint myself with these tools as well.
My approach to exploring my interest in Windows Deployment has always been to learn from the ground up, hence I wanted to familiarise myself with these WAIK tools to begin with. Before I move on to MDT 2010 I want to write a couple of ‘how to’ posts on creating a Windown PE disk, capturing and applying an image using imagex and my experiments with these tools in general.
In this post I will provide instructions on creating a bootable WinPE USB drive, with ImageX “integrated” into the Windows PE environment.
What you will need:
A Technician Computer (A windows 7 machine with the WAIK installed)
A USB drive to create a bootable WinPE disk
Building the WinPE Environment
On your Technician Computer open the “Deployment Tools Command Prompt” from Start, All Programs, Microsoft Windows AIK.
Note that these instructions are to create a 64-bit WinPE disk. If however you prefer To create 32-bit WinPE disks simply replace amd64 with x86 in these instructions.
At the command prompt type the following commands. Replace amd64 with x86 if you wish to create a 32-bit WinPE disk.
CopyPE.cmd amd64 C:\WinPE_amd64 DISM /Mount-WIM /WimFile:c:\WinPE_amd64\WinPE.wim /Index:1 /MountDir:c:\WinPE_amd64\Mount Copy “C:\Program Files\Windows AIK\Tools\amd64\ImageX.exe” C:\WinPE_amd64\Mount\Windows\System32\ DISM /Unmount-WIM /MountDir:C:\WinPE_amd64\Mount /Commit Copy C:\WinPE_amd64\WinPE.wim C:\WinPE_amd64\ISO\Sources\boot.wim
Preparing the USB Drive
The USB drive will need to be prepared before you can copy over the WinPE files. This includes stripping all formatting, creating a new active primary partition, and finally formatting it as FAT32 using diskpart.
On the command prompt type the following commands
diskpart list disk
This will list all disks connected to your computer including USB drives. Identify your USB flash drive from the list and make note of the disk no. In my example below I can easily identify my USB drive as disk 5.
Make sure you get the right disk number and proceed with the rest of the instructions here.
select disk 5 clean create partition primary select partition 1 active format quick fs=fat32 assign exit
Finally copy everything from c:\winpe_amd64\iso to the usb drive. Once that’s done you now have a Windows PE USB drive to capture and apply Windows 7 images using ImageX.
In my next post I will cover how to capture Windows 7 images using the WinPE USB drive created in this post.
PS. The very first time I tried doing this I ended up copying imagex to the c:\winpe_amd64\iso directory which meant it wasn’t actually “integrated” into the WinPE environment but instead had to be launched from the USB drive. Although not technically a ‘mistake’ as such, it required using diskpart to work out the drive letter of the usb drive to be able to use imagex. In my second attempt I used ImageX (instead of DISM) to mount the winpe.wim file to copy imagex into the c:\winpe_amd64\mount\Windows\System32 folder which is how it’s done with Vista and not Windows 7. Although this worked just fine, I wanted to do it the right way so I used DISM to do it properly on my third attempt. It’s fair to say it’s been a learning experience.
Follow Me, Myself and IT on Twitter:Follow @emeneye