Showing posts with label ImageX. Show all posts
Showing posts with label ImageX. Show all posts

Wednesday, December 17, 2014

Using offline servicing in a server image with multiple indexes

Within ConfigMgr 2012 it's possible to update images with offline servicing functionality. When doing that on server media however, it's possible that multiple indexes are found. When that's the case, updates will be installed on all indexes, which takes a lot of time. In this scenario I'm installing 75 updates on a Windows Server 2012 R2 image with 4 indexes, which are:
-SERVERSTANDARDCORE
-SERVERSTANDARD
-SERVERDATACENTERCORE
-SERVERDATACENTER


When starting offline servicing on this image, a total of 300 updates (4x 75) will be installed. Let's have a look at the ConfigMgr logfile (OfflineServicingMgr.log):
4 images are detected
300 updates are installed

When using DISM however it's possible to remove existing indexes from an image, so offline servicing can do a way better/faster job. This can be done with the following command: DISM /get-imageinfo/imagefile:<path to WIM file>
 
Now that we know which index to keep and which to remove, use the following command: DISM /delete-image /imagefile:<path to WIM file> /index:<index number to remove>
 
In my case I removed 3 indexes, because the only index needed is SERVERSTANDARD. Let's have a look again with: DISM /get-imageinfo/imagefile:<path to WIM file>

There's only 1 index left now. Let's start offline servicing again on this image and have a look at the logfile (OfflineServicingMgr.log):
1 image is detected
75 updates are installed

As you can see this did the trick on my Windows Server 2012 R2 image. Did see another image with 8 indexes before also, which is crazy when using offline servicing. Just use above steps for removing them in the future. Just great isn't it?

Offline servicing is still very handy for updating images easily/quickly, when MS Office is not included in the image.

Source: Microsoft TechNet

Option: /Get-ImageInfo
Displays information about the images that are contained in the .wim, vhd or .vhdx file. When used with the /Index or /Name argument, information about the specified image is displayed, which includes if an image is a WIMBoot image, if the image is Windows 8.1 Update, see Take Inventory of an Image or Component Using DISM. The /Name argument does not apply to VHD files. You must specify /Index:1 for VHD files.

Option: /Delete-Image
Deletes the specified volume image from a .wim file that has multiple volume images. This option deletes only the metadata entries and XML entries. It does not delete the stream data and does not optimize the .wim file.
This command-line option does not apply to virtual hard disk (VHD) files.
/CheckIntegrity detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.

Monday, July 23, 2012

How to Create a Windows To Go USB Drive

With Windows 8 coming within a few months it's good to have a look a new functionality. One way to install Windows 8 is on a VHD (Virtual Hard Disk). New in Windows 8 is the option to mount VHD files and boot from it! A guide to install Windows 8 on a VHD can be found HERE. Great that so many people viewed this blogpost to install it that way. In this blogpost I explain the new Windows To Go functionality.


Windows To Go is an enterprise feature of Windows 8 that enables users to boot Windows from a USB-connected external drive. Windows To Go drives can use the same image enterprises use for their desktops and laptops and can be managed the same way. Windows To Go is not intended to replace desktops, laptops or supplant other mobility offerings. Rather, it provides support for efficient use of resources for alternative workplace scenarios.

 You need the following for installation:

  • 16 GB or larger USB 2.0 / 3.0 Drive
  • Windows 8 Release Preview ISO (download HERE) 
  • ImageX.exe stand-alone straight from Microsoft (download HERE)

That way you don't have to download a full copy of Windows Automated Installation Kit (AIK) for Windows 7 (1.7 GB) found HERE.


How to Create a Windows To Go USB Drive:
  • Quick Format the USB device with NTFS, and create a partition on it
  • Extract or mount the Windows 8 ISO and copy the Install.wim file (Sources folder) to a folder where ImageX.exe is also placed
  • Have a look at the drive letter which is used for the USB device and type the following command: ImageX.exe /apply Install.wim 1 F:\ (where F: is the drive letter of your USB device)
  • The result (after some time) must be "Successfully applied image"
  • Once this is done the boot record on the USB device must be changed with the following command: Bcdboot.exe F:\Windows /s F: /f ALL (where F: is the drive letter of your USB device)
  • The result must be "Boot files successfully created" now

After the command has completed you are ready to use your new Windows To Go USB device. Now it's time to reboot your system and start from the USB device. There will be some final configuration during first start. During the session the USB device must be plugged in.


What a great year with many new Microsoft releases and functionality!