About the author

Jason Huitt is on the Windows Group with Academic Computing and Networking Services at Colorado State University.
E-mail me Send mail

Authors

Tags

None

    Blogroll

      Disclaimer

      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      © Copyright 20082010

      Building a WinPE 3.0 Image from Scratch

      1. Download the Windows Automated Installation Kit for Windows 7 (WAIK) - http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en 

      2. Start | All Programs | Microsoft Windows AIK | Windows PE Tools Command Prompt -> This command prompt preloads the necessary folders into the path variable for easy image editing. Make sure to Run as Administrator!

      3. copype.cmd <x86 | amd64 | ia64> <destination folder to create, ex: z:\PEBuild> This script creates a workspace for manipulating WinPE images prior to burning a CD or copying to a flash drive.  The ISO folder contains the files used for both.  The file ..\PEBuild\ISO\Sources\boot.wim is the actual WinPE image that the bootloader extracts to a RAMDisk when WinPE boots.  The copype.cmd also creates a second copy of the WIM called winpe.wim in the root of the PEBuild folder - this provides you with an easy way to make a "start fresh" with a new WinPE boot image if necessary.

      4. To place tools or files within the ISO (on CD) or on the flash drive you will boot from, copy the files to the z:\PEBuild\ISO folder.

      5. To place tools or files within the RAMDisk that WinPE boots from (which is useful to retain access to tools, such as Imagex, when you pull the flash drive or CD from the computer upon which you will boot into WinPE), use this command: imagex /mountrw ISO\Sources\boot.wim 1 .\mount  ->  This mounts the WIM file to the mount folder within your PEBuild workspace. (Note that DISM.exe can be used in place of Imagex if you prefer.)  This step is also necessary to perform driver servicing on the WinPE boot image, as discussed in step 6 below.

      6. To load additional drivers into a your WinPE image, use the following command after proceeding with step 5 above): Dism /image:<path_to_image> /Add-Driver /Driver:<path_to_driver.inf>  Note that this command must be run against a mounted WIM file (performed in step 5 above).  For more on driver servicing and WinPE, see the following article on TechNet: http://technet.microsoft.com/en-us/library/dd799258(WS.10).aspx.

      7. When you are finished editing the WIM file, do this: imagex /unmount /commit .\mount

      8. Make sure to copy ImageX to your ISO folder so you can apply an image to a hard drive.  Use this command: copy "c:\Program Files\Windows AIK\Tools\x86\imagex.exe" z:\PEBuild\ISO

      8. WinPE is now ready to go.  Either burn the entire contents of the ISO folder to a CD marked as bootable (step 9), or copy the entire contents to a flash drive (follow the steps listed here to prepare your flash drive).

      9. If you intend to create a bootable CD, you'll need to use the following command to create an ISO from the files in the ISO folder (using the PE Tools Command Prompt): oscdimg -n –bz:\PEBuild\etfsboot.com z:\PEBuild\ISO Z:\PEBuild\winpe_x86.iso  You can then burn the resulting ISO to disk.


      Categories: IT | Windows | WinPE
      Posted by Jason on Thursday, January 07, 2010 3:35 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Installing Updated NIC Drivers into a WinPE Image

      1. Download the appropriate driver.  You'll need an INF file to complete the install.
      2. CD to the root of your WinPE build folder. 
      3. Mount your WinPE boot.wim (imagex /mountrw .\ISO\sources\boot.wim 1 .\mount).
      4. Install the driver (peimg /inf=<full path to INF file> .\mount\windows)
      5. Unmount the WinPE image (imagex /unmount .\mount /commit)
      6. Optional: Create a new ISO for burning to CD (oscdimg -n -b<path to etfsboot.com> <file name of ISO to create>)

      Categories: IT | WinPE
      Posted by Jason on Friday, October 31, 2008 3:19 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Updating a WinPE Image with Hyper-V Integration Components Drivers (Hyper-V RTM)

      Here, are instructions for integrating the Hyper-V RTM (!) Integration Components device drivers into a WinPE image.  This is based on Mike Sterling's post on the same topic, however the scripts below have been updated to use RTM Hyper-V bits.

      1. Create your WinPE build folder, if you haven't already done so.  See Building a WinPE Image from Scratch for help (follow only steps 1 through 5).
      2. In the root of your build folder, download the appropriate integration batch file from the bottom of this post.
      3. Locate Windows6.0-KB951634-x86.msu.  This file is on the c:\windows\system32\vmguest.iso, located on any Hyper-V enabled host.  The update file should be located in the Support folder of the ISO.  Copy this file to the root of your WinPE build folder - the same location as your integration batch script.
      4. From the Windows PE Tools Command Prompt, execute the integration script.  If everything went correctly, you'll see "PEIMG completed the operation successfully." listed seven times in the output of the script.
      5. At this point your WinPE build is updated.  Resume steps 7 through 9 in Building a WinPE Image from Scratch to complete the process.

      If you have questions about the above, please e-mail me at jason.huitt@colostate.edu - I've run both of these scripts successfully as of today, and now have working x86 and x64 WinPE ISOs.  My trust WinPE flash drive has been updated as well.  You'll love the integrated mouse and NIC support when building Hyper-V VMs.  No more Legacy Network Adapter!

      Integrate_x86.bat (1.10 kb)

      Integrate_x64.bat (1.12 kb)


      Categories: Hyper-V | IT | Server 2008 | Windows | WinPE
      Posted by Jason on Tuesday, October 21, 2008 4:04 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Network Not Available to WinPE on Hyper-V Virtual Machine

      If you attempt to boot into Windows PE from a Hyper-V virtual machine, you may not be able to immediately access network resources as you would expect.  This is because a default VM configuration in Hyper-V includes the synthetic network card, which is not visible to any OS that doesn't have the Integration Components installed.  To enable network functionality on a Windows PE VM, remove the existing network card from your configuration, then select Add Hardware, and choose the Legacy Network Adapter.

      You'll need to remove and re-add the synthetic network adapter (listed simply as Network Adapter in Hyper-V VM settings) when you have Vista or Server 2008 installed.


      Categories: WinPE | Server 2008 | Hyper-V
      Posted by Jason on Thursday, March 20, 2008 2:05 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Imaging with 2008 Server Core

      Vista's deployment tools are hands down the best that Microsoft has released for managing Windows deployments to date - and so far really I'm only talking about SysPrep and ImageX.  We are going to make a concerted effort with Windows Server 2008 to maintain reference build images of our server configs so we're certain we're getting the same config on each of our servers, something that we hadn't been able to focus on in 2003.  Here's a highlight that impressed me this morning...

      1. Build Windows Server 2008 Standard Server Core installation
      2. Log in, set a basic password
      3. cd \Windows\System32\Sysprep, run Sysprep.exe
      4. Use OOBE mode, generalize the OS, and click OK
      5. On reboot, boot from your Windows PE media
      6. Run ImageX in capture mode (with max compression) to take an image of the SysPrep'd Server Core installation

      This resulted in a 340MB image that when applied back to the server takes less than two minutes to install!  When imaging completes and you reboot, the SysPrep wizard will prompt you to accept the License Agreement, and then allow you to set the computer name.  You're then presented with Ctrl+Alt+Del, and on logging in the first time must set your Administrator password.

      To extend this a bit, you could use a SysPrep answer file to assign an IP or join a domain, which I'm doing manually right now.  However, this points to a bright future where server provisioning can be just about completely automated.  I can currently roll a Standard Server Core image out and be logged into a command prompt and ready to configure in under 15 minutes.  Nice work Microsoft!


      Categories: IT | Windows | WinPE
      Posted by Jason on Friday, February 22, 2008 11:13 AM
      Permalink | Comments (0) | Post RSSRSS comment feed

      No Slipstream with Vista SP1

      The folks at NeoWin have a great FAQ about a lack of slipstream capability with Vista SP1.  Read more here, but the bottom line is there's a "servicing layer" in Vista that allows for easier application of most updates, but SP1 includes updates to this layer that prevent a WIM image from being updated offline.  The solution is to build a Vista image, apply the new service pack, sysprep the machine, then take a new WIM image.

      That or wait for Microsoft to release a new DVD with the SP1 bits already added...

      Also note that a new version of the Windows Automated Installation Kit (WAIK) is available for Vista SP1 and Server 2008 here.

      Update 18:25MST - WinBeta.org has an interesting write-up of an unsupported but potentially workable SP1 slipstream using SysPrep in their Vista SP1 Reverse Integration Guide.


      Categories: IT | Windows | WinPE
      Posted by Jason on Monday, February 18, 2008 10:03 AM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Imaging in Windows with ImageX

      ImageX is Microsoft’s image creation and application tool included with Windows Vista.  It is also capable of creating images of Windows XP machines.  Images can be applied from a large flash drive, or over the network using WinPE.

      SysPrep

      First, prepare your system for disk cloning using SysPrep.exe (located at c:\Windows\System32\Sysprep on all installations of Vista).  Vista’s SysPrep has the following options:

      -          Out-of-Box-Experience: Normal SysPrep – resets system to setup state, will boot to setup wizard on next boot

      -          Audit Mode: Similar to XP SysPrep “Factory Mode”, configures computer to boot directly to an Administrator log-in on next boot, allowing you to “edit” the image after restore without going through the final stages of Windows Setup.

      -          Generalize: Resets Vista’s driver configuration and performs full device detection after image restore.

      -          If you have not removed the computer from any domain prior to executing SysPrep, SysPrep will do this automatically.

      SysPrep executes in GUI mode by default.  You must provide command-line arguments to use an unattended setup file (use /? for assistance).  Microsoft recommends that you use Windows System Image Manager, part of the Windows Automated Installation Kit, to create unattended setup files for use with Vista.

      Note: To create ImageX image files for Windows XP, simply run XP SysPrep as you normally would.  ImageX simply replaces any other disk cloning software in such a case.

      Image Creation

      Once SysPrep completes, boot off of your flash drive and connect to a network drive to store the image (using net use).  Next, you’ll need to locate and switch to your flash drive, as you’ll need to run ImageX from there (this is usually the E: drive in single partition scenarios). 

      Next, use ImageX.exe to create the Windows Image file (WIM):

      imagex /capture c: x:\YourImage.wim “Descriptive text can go here”Where c: is the source drive for the image, and x: is the network drive.  The description is optional.  Also, you can optionally specify the type of compression used for the initial capture operation, as follows:/compress [maximum | fast | none]

      Image Application

      Images are easily applied after booting from your WinPE flash drive.  First, prepare the system drive for Windows.  Next, connect to the network using net use if necessary.  Finally, the basic command is:

      imagex /apply x:\image.wim 1 c:

      Where 1 indicates the image within the WIM file to apply (1 in most cases), and where c: is the system volume on the destination computer.


      Categories: IT | Windows | WinPE
      Posted by Jason on Thursday, February 14, 2008 10:10 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Creating a Bootable Flash Drive with WinPE and Windows Vista

      Insert your USB flash drive (at least 256MB) into a Vista or Windows 7 workstation, and ensure that the disk is empty.

      Open a Command Prompt and enter the following commands:

      diskpart

      list disk     (note the disk number that corresponds to your flash drive)

      select disk x

      clean

      create partition primary

      active              (flags the partition as bootable from BIOS)

      format quick fs=ntfs

      exit

      Note: This post was edited 2010-01-07 to mention Windows 7 as a potential OS on which to perform the above actions. Edited 2010-03-15 to use NTFS instead of FAT32.


      Categories: IT | Windows | WinPE
      Posted by Jason on Thursday, February 14, 2008 10:05 PM
      Permalink | Comments (0) | Post RSSRSS comment feed

      Building a WinPE Image from Scratch

      1. Download the Windows Automated Installation Kit (WAIK) - http://www.microsoft.com/downloads/details.aspx?FamilyID=94BB6E34-D890-4932-81A5-5B50C657DE08&displaylang=en (Note - as of 2008-02-18 this version has been updated for Vista SP1 and Server 2008)

      2. Start | All Programs | Microsoft Windows AIK | Windows PE Tools Command Prompt -> This command prompt preloads the necessary folders into the path variable for easy image editing.

      3. copype.cmd <x86 | amd64 | ia64> <destination folder to create, ex: z:\PEBuild> In Vista, right click and Run As Administrator -> This script creates a workspace for manipulating WinPE images prior to burning a CD or copying to a flash drive.  The ISO folder contains the files used for both.  ..\PEBuild\ISO\Sources\boot.wim is the actual WinPE image that the bootloader extracts to a RAMDisk.  The copype.cmd also creates a second copy of the WIM called winpe.wim in the root of the PEBuild folder - I assume this is to provide you with an easy way to "start fresh".

      4. To place tools or files within the ISO (on CD) or on the flash drive you will boot from, copy the files to the z:\PEBuild\ISO folder.

      5. To place tools or files within the RAMDisk that WinPE boots from (useful to retain access to your tools when you pull the flash drive or CD), use this command: imagex /mountrw ISO\Sources\boot.wim 1 mount  ->  This mounts the WIM file to the mount folder within your PEBuild workspace.

      6. To load additional drivers into a your WinPE image, use the following command: peimg /inf=<complete path to driver inf file> mount\Windows -> This points to the Windows folder within the WIM file mounted to the mount folder within your PEBuild workspace.  Note this command must be run against a mounted WIM file.

      7. When you are finished editing the WIM file, do this: imagex /unmount /commit mount

      8. Make sure to copy ImageX to your ISO folder so you can apply the image to your hard drive.  Use this command: copy "c:\Program Files\Windows AIK\Tools\x86\imagex.exe" z:\PEBuild\ISO

      8. WinPE is now ready to go.  Either burn the entire contents of the ISO folder to a CD marked as bootable (step 9), or copy the entire contents to a flash drive (follow the steps listed here to prepare your flash drive).

      9. If you intend to create a bootable CD, you'll need to use the following command to create an ISO from the files in the ISO folder (using the PE Tools Command Prompt): oscdimg -n –bz:\PEBuild\etfsboot.com z:\PEBuild\ISO Z:\PEBuild\winpe_x86.iso  You can then burn the resulting ISO to disk.

       


      Categories: IT | Windows | WinPE
      Posted by Jason on Thursday, February 14, 2008 9:08 PM
      Permalink | Comments (0) | Post RSSRSS comment feed