Offline-building Windows Embedded Standard 2011 Images

Offline-building Windows Embedded Standard 2011 Images

  • Comments 3

One of the biggest changes between our Windows Embedded Standard 2009 (XP Embedded) and Windows Embedded Standard 2011 tools is the concept of image building. In Windows Embedded Standard 2009, components were selected in Target Designer and images assembled on the developer machine, after which it had to be transferred to the target device. In Windows Embedded Standard 2011, images are now built directly on the device using our Image Based Wizard (IBW) which can be configured “on the fly” using the wizard interface, or by using a preconfigured answer file. Each method has its own pros and cons, and while I won’t go into them, there certain applications and scenarios where it is still advantageous to be able to build images offline.

This article goes over the steps for assembling a Windows Embedded Standard 2011 image with the desired feature sets, using only the tools found on your developer machine. This method can save a lot of time and also utilize less memory on the target, if you have to build & deploy your images on a resource constrained devices. As an example, we found that the time taken for building and deploying a MaxBoot image on a target device with 2 Ghz machine w/ 1gig of ram can be cut from 30 minutes to 15 minutes. The time savings only get greater for target devices with more limited resources. Note: This does not include the time taken to offline-build the image as those times can vary significantly depending on the configuration of the developer machine.

Before I proceed further, please note that this method for building images is not a perfect substitute for building images using the IBW. Not all image configurations can be built using this method, and I’ll call out what developers should be aware of as we proceed through the steps.

Step 1: Create an answer file/configuration set

The first step to building your image is to select the feature sets, settings, and drivers that you want in your image. You need to do this using the Image Configuration Editor (quick tutorial available here).

After building & validating your answer file, you will want to generate a configuration set of your answer file. A configuration set creates an AutoUnattend.xml file and copies the packages needed to support the AutoUnattend.xml to the specified folder.

You can create the configuration set by clicking on ‘Tools’ and then ‘Create Configuration Set’ and specifying the output folder.

clip_image002

-------------------------------------------------------------------

  • Callout #1: One note here is that any settings in the answer file specified to be applied in the “Windows PE” pass will not get applied as IBW usually applies these steps. You can either configure these steps to be applied in the “offline servicing” phase or you will need to manually apply them during the steps outlined in the next section.
  • Callout #2: If you plan on using the Manual Deployment method outlined in section 3, then changing the %SYSTEMROOT% will not work. The %SYSTEMROOT% is specified as C: by default and modified by IBW once the image has been laid out. Hence, if the final image will not reside on a C: partition, the Manual Deployment method is not recommended.

Step 2: Applying the Configuration Set & Capturing the image

This set requires that you have DISM on your Machine. DISM is the new servicing tool that comes provided with Windows 7, so these steps will need to be executed on a Windows 7 machine.

  • First step is to copy the appropriate install.wim file for your device into the Configuration Set folder created in the previous section. The install.wim file holds the basic eCore image and can be found in the Distribution Share folder (typically located in the Program Files\Windows Embedded Standard 2011 folder). Note: Make sure to select the install.wim file that corresponds with the processor architecture of your target device (i.e. x86 or x64).
  • Now you want to mount the eCore WIM on your system in order to apply the configuration set. Open an Administrator command prompt on your machine and navigate to the Configuration Set folder and run the following commands:

>mkdir mount

>dism /mount-wim /wimfile:install.wim /index:1 /mountdir:mount

  • Now that the WIM is mounted, apply the Configuration Set:

>dism /image:mount /apply-unattend:AutoUnattend.xml

    • [Optional] Copy the answer file as \Windows\Panther\Unattend.xml folder in the mount folder.
    • [Optional] Copy your custom files, drivers, or offline customizations to the mounted image. Note: The OEM folders function in the answer file will not apply when deploying the offline built image, so these need to be manually made to the image.
  • Create a new WIM containing the changes made. This is required as the original install WIM contains metadata that is used by IBW that no longer applies for your image.

>imagex /capture mount custom_image.wim “My Custom Image”

  • Unmount the WIM file and commit the changes (for later use)

>dism /unmount-wim /mountdir:mount /COMMIT

You should now have a custom_install.wim file that represents the image that was specified in the configuration set. The next step is to deploy this image to the target device.

Step 3: Deploying the Image

Now that you have built your image you can now deploy it on your target device.

IBW Deployment

The first option is that you can use IBW to deploy the image in your WIM file. This may seem redundant as the point of offline building was to avoid IBW; however, one of the most resource hungry parts of the IBW image building process is applying the packages to the system. By using your developer machine to do the heavy lifting, IBW now only has to prep the HDD on your target device and apply the WIM file, as well as a few other administrative tasks.

In order to deploy using IBW, you need some way to transport your WIM file to the target device (USB key or other). Boot into your target system using the IBW, and on the first screen, you can select that you want to deploy a WIM file:

image

Follow the on-screen instructions and you’re good to go!

  • Callout #4: If there are special settings in your answer file that you also wanted to apply to the image in the WIM file, it is also possible to specify the answer file to IBW when deploying the WIM. You can do this by launching the command prompt by pressing Shift-F10 on the screen above (before selecting anything), then launching setup from the command prompt and specifying the WIM file and answer file:

>setup.exe /installfrom:<path_to_wimfile> /answerfile:<path_to_answerfile>

Note: One can also deploy their custom WIM using Manual Deployment. This requires you to prep your device manually, by properly formatting the media, setting up the BCD, applying the WIM, etc. by booting into Win PE with the right tools. There are several caveats to using this method, some of which have been called out above. However, this can also save additional prototyping and deployment time. As such, this exercise is left for the reader, but if you want some tips, feel free to send me a message!

Cheers,

- Punit

Technorati Tags: ,,,
  • Hi Punit,

    I have successfully installed WES 2011 CTP2 on to a VW and it was quite easy and only consumed 1.56Gb. But I'm now trying to install on a Thin Client with only 2Gb Flash.

    So far I have been able to install "Minimal Install" only, is there a cheat to tell the IBW how to use maybe a USB stick for a temp storage so that I could do the "Thin Client" install - or will this require using the Step 2 as you've documented above?

    Cheers,

    Dave

  • Hey David,

    Short answer is yes, you may have to offline build to get your image on the target.

    I wrote up these instructions because people have run into memory issues on the target device.  Part of the reason IBW requires more memory for "online" installation is because it needs to lay down the embedded core image and apply all necessary packages while running on the device.  This requires the use of a pagefile and additional storage on the target device.

    You can configure another storage drive for temporary files by specifying the "/tempdrive:<drive letter>" flag to IBW, but unforunately this does not work with removable media.

    Let me know how it goes.

    - Punit

  • Hi Punit,

    I am getting errors deploying my WIM file.  The error in my cbs_unattend.log is "Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}D:/Windows/System32/config/DEFAULT, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]".

    Any thoughts or ideas?

    Cheers,

    Nat

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post