Introduction: How to Create a Wimboot Installation of Windows 8.1

Introduction

Ever wonder how computer manufacturers can fit a 20 GB installation of Windows onto a 16 GB drive? It is now possible with Windows 8.1 through a feature called “wimboot.” Traditionally, computers had a boot, recovery, and windows partition—which is an extracted version of the recovery image. In a wimboot installation, however, the recovery image is used to boot and load Windows:

Traditional Install

Wimboot Install

When applying or deploying a wimboot image, pointer files are created on the Windows partition rather than extracting the actual file. You can read more about it here but with this method, you can expect to reduce the size of a Windows installation by about 50% or more!

Keep in mind that there are limitations to using wimboot which you should read on Microsoft’s site here. However, if you wish to test it yourself, I claim no responsibility for any data loss.

Step 1: Gather Your Materials

To make a wimboot installation, a Virtual-to-Physical Migration or V2P can be done. You will create a virtual machine, configure it to your specifications, and deploy it to your device. To get started, you’ll need the following:

Source Machine

  • At least 1.3 GHz Intel Core 2 Duo
  • At least 2 GB RAM
  • At least 32 GB free space
    • SSD drive is preferable to speed up process but mechanical is fine
  • VMWare Player 6 (free): http://www.vmware.com/go/downloadplayer/
    • Ensure you are downloading version 6 as version 7 will not allow you to create 32-bit Virtual Machines

Destination Machine

  • Windows 8.1 Laptop/Tablet with SSD/eMMC drive and UEFI-compatible motherboard
  • At least 3 free USB ports (For keyboard, Windows 8.1 Setup USB, and Backup USB Drive)
  • Valid Windows 8 or 8.1 Key
    • If you want to try it out, you can use a generic key (these won’t activate)
      • 334NH-RXG76-64THK-C7CKG-D3VPT (Regular)
      • XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB (Pro)
    • Note: The product key in some windows 8 tablets such as Winbooks cannot be used with most Windows 8.1 media since their version is “Windows 8.1 with Bing” (aka Core Connected). This version is not included in the standard image. You’ll need to either transfer a retail license, purchase an upgrade, or find the Windows 8.1 Core Connected ISO image elsewhere
  • Windows 8.1 32 or 64 bit ISO/USB
  • Flash drive or external drive with 16+ GB free space and formatted as NTFS
  • Programs you want to have on your custom image

Step 2: Prepare the Virtual Machine

From this point forward, the virtual machine (VM) will be known as the reference machine or reference image. This VM will help create a custom image that will replace the manufacturer's image.

1. Open VMWare Player

2. Click Create a New Virtual Machine. Select “I Will install the operating system later”. Click Next

3. Select Microsoft Windows and choose which bit version of windows 8 you will be deploying on your device. Click Next

4. Enter a descriptive name for the reference image. By default, the virtual machine will be stored in your documents folder. Change if desired. Click Next

5. You may choose to edit the disk size or split the virtual hard disk. However, it is recommended to leave it at 60 GB but store it as a single file. Click Next

6. Click Customize Hardware. Select the DVD drive and choose to use an ISO. Browse to the Windows 8.1 ISO. Click Close and Finish

7. Browse to where the virtual machine files are stored. Open the VMX file in notepad. A VMX file will look like this:

8. At the end of the file, create a new line and type in: bios.bootDelay = “10000”. This will postpone booting to give time to boot to DVD in the later steps.

9. Save the file. Close Notepad

10. Power on the VM. Run through the Windows Setup normally. DO NOT proceed when you see the personalize screen below. Instead, press Ctrl + Shift + F3. Windows will reboot into audit mode where we will customize our image.

Step 3: Customize the Reference Image From the Virtual Machine

Once Windows reboots, it will log on as administrator and the System Preparation Tool (Sysprep) will appear. This is the stage where drivers, applications, and customizations are applied. Since the system is not yet ready to be sealed, click the X button to close it. Note that whenever Windows reboots, it will display this box. Keep closing this as many times as needed in this step.

Driver Installation

In order for the reference image to fully function on the destination device, model-specific drivers must be injected into the image. This step assumes that the destination device is running the factory image and has all drivers preinstalled by the vendor.

On the Destination Machine

1. Open Command Prompt as Admin. Enter the following commands below. This will backup all drivers that are not part of the Windows 8.1 generic drivers

md C:\FactoryDrivers
dism /online /Export-Driver /Destination:C:\FactoryDrivers

2. Copy the FactoryDrivers folder to a USB drive. It is also recommended to rename, zip, and backup the folder for future reference.

On the Reference Machine (Virtual Machine)

1. Attach the USB Drive containing the “FactoryDrivers” folder

2. Create a folder on the C: drive called “Recycler”. This will be a temporary folder for working with the reference image. It will automatically be excluded when the system is captured.

3. Copy the “FactoryDrivers” folder into C:\Recycler. The drivers will later be injected during the capture phase.

Install Base Applications

Next step is to install base applications. Base applications are programs that you use frequently but do not require activation. Examples include web browsers, media players, etc. Note that Microsoft Office, antivirus programs, and other applications that require activation are not included since sysprep removes system-specific information that is needed to maintain activation.

Below are some recommended base applications to include in your image. Feel free to add additional (non-activating) programs as desired.

Update Windows

Next step is updating windows. Note that Windows Update will not work in audit mode. In order to install updates, powershell must be used. The steps below assume you want to install ALL updates, including recommended ones.

1. Download the Windows update Powershell module from: https://gallery.technet.microsoft.com/scriptcente...

2. Extract the zip file to C:\Windows\System32\WindowsPowerShell\v1.0\Modules

3. Go into Control Panel and change Windows Update settings to enable updating other products from Microsoft. Click OK and close Control Panel.

4. Open powershell as admin

5. Enter the command below. This permits execution of third-party modules. Confirm when asked

Set-ExecutionPolicy unrestricted

6. Enter the following commands. This will update download and install updates from the command line and reboot as needed.

Import-module PSWindowsUpdate
Get-WUInstall –MicrosoftUpdate –AcceptAll –AutoReboot

It may take a while to show progress but surprisingly, this method is a lot quicker than using the GUI.

7. Run step 6 a few times until no updates are available, rebooting as many times as necessary

Other Customizations

(Optional) Delete All Pre-Installed Windows 8 Apps from All and New Users

1. Open powershell as admin

2. Enter the following commands below. Note: The vertical bar after online and AllUsers is a pipe (not an L or 1). To type it, hold Shift and press the \ key.

Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage –onlineGet-AppxPackage -AllUsers | Remove-AppxPackage

3. From here, you may perform additional software installation or customizations. Proceed to step 4 once your customizations are complete.

Step 4: Prepare and Seal the Image

Sealing the image will enable the push-button reset feature and display the out-of-box experience (OOBE) to the end-user. These steps are to be done on the reference machine (VM).

Cleanup the Image

1. Reboot the system to clear out any remaining install processes

2. Open Command Prompt as admin

3. Enter the following command:

Dism /online /cleanup-image /StartComponentCleanup /ResetBase

This makes all updates permanent and removes the ability to uninstall them

4. Once complete, use Disk Cleanup to clear other temporary files.

Move the Recovery Environment out of the Reference Image

1. Open File Explorer

2. On a USB drive, create a folder called: sources

3. Edit explorer options to Unhide hidden and OS files

4. Open the C Drive

5. Go to C:\Windows\System32\Recovery

6. Cut and paste the winre.wim file into the sources folder on your USB drive

Seal the Image

1. Open command prompt as admin

2. Enter the following commands:

cd C:\Windows\System32\Sysprep
sysprep /generalize /oobe /shutdown

This will remove any system specific info, cleanup the administrator account, enable the recovery environment, and push-button reset feature

Step 5: Inject Drivers and Capture the Image

Microsoft’s built-in imaging utility, DISM (Deployment Image Servicing and Management tool), will convert our installation into a wimboot install. More info about its features can be read here: https://technet.microsoft.com/en-us/library/hh825... The following steps are to be done within the reference machine (virtual machine).

1. Boot to the Windows 8.1 DVD/USB by pressing Esc during the BIOS screen

2. When the Welcome Screen shows, press Shift + F10 to open command prompt

3. Insert the USB drive containing the sources folder created in step 4

4. Enter the following commands below. Change paths as necessary. Comments added for better understanding of process

Verify/Reassign Drive Letters

Diskpart
List volume
Exit

Note which letters are for your DVD, OS, and USB drive. The remaining commands assume C = Windows Drive, D = Windows 8.1 DVD/USB, and B = Backup USB. Adjust paths or Reassign letters using diskpart if needed. For help with diskpart, please read: https://technet.microsoft.com/en-us/library/cc766...

Inject Model-Specific Drivers

Dism /add-driver /image:C:\ /driver:C:\Recycler\FactoryDrivers /Recurse /ForceUnsigned

Windows will inject the model-specific drivers into the reference image. After applying the image to the destination device, Windows will automatically install these drivers during the OOBE process.

Capture the Installation

dism /Capture-Image /ImageFile:B:\sources\install.wim /Name:”Winbook TW700 Wimboot” /CaptureDir:C:\ /wimboot /scratchdir:C:\Recycler

Adjust the name parameter according to the destination device.

Dir B:\sources /a

Note the size of all files in this directory. Convert bytes used into megabytes. Multiply this by 1.006 (NTFS Overhead) and add 55 MB (required free space). Round up to the nearest megabyte. So, if the size of both files is 7367 MB, a recovery partition of 7422 MB is needed to accommodate the recovery environment and image. The extra space is also required to register the recovery environment and enable the push-button reset function. In summary: Recovery Partition Size = (install.wim + winre.wim size in MB) x 1.006 + 55

Step 6: Deploy the Wimboot Image

This step will clean the drive on the desination machine and apply the custom wimboot image. Before continuing, make a backup of the destination machine, especially its current recovery drive. I claim no responsibility for any data loss.

1. In the destination machine, enter the BIOS/UEFI setup menu. Change the boot order such that the last three are: “Windows Boot Manager,” internal hard disk, and Internal EFI Shell. USBs should be listed first.

2. Insert the Windows 8.1 USB/DVD and boot to it

3. At the Welcome Screen, press Shift + F10 to open command prompt

4. Enter the commands below. Comments added for better understanding of process

Create the EFI Partition Layout and Protect the Recovery Drive

Diskpart
Select disk 0
Clean
Convert GPT
create partition efi size=100
format quick fs=fat32 label="SYSTEM"
assign letter="S"
create partition msr size=128                     
create partition primary
shrink minimum=N

Where N is the size of the recovery partition calculated earlier

format quick fs=ntfs label="WINDOWS 8.1"
assign letter="W"
create partition primary
format quick fs=ntfs label="RECOVERY"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001

Verify Disk Layout

List Volume
Detail Disk
List Partition
Exit

After doing the last 3 commands, the disk should look similar to this:

Copy WIMs to Recovery Drive

Robocopy B:\sources R:\sources

Where B:\ is the drive containing the recovery environment and custom wim file created earlier in step 5. Adjust the path as necessary

Apply the Wimboot image

dism /Apply-Image /ImageFile:R:\sources\install.wim /Index:1 /ApplyDir:W:\ /wimboot

Recreate boot and system partition

bcdboot W:\Windows /s S:\

Register the recovery environment

W:\Windows\System32\reagentc /setreimage /path R:\sources /target W:\Windows

Eject or remove the Windows 8.1 install media and other external drives.

Reboot. Windows should go into OOBE mode. Personalize as necessary

Testing the Push-Button Reset Feature (Recommended)

Once logged in, expand the Charms bar

Click Settings > Change PC Settings > Update and Recovery > Recovery

Under Remove everything and reinstall Windows, click Get Started. The Reset your PC notice appears.

Click Next > Just remove my files > Reset. This will quick format the C drive.

Hint: The "Fully clean the drive" option will zero the Windows partition--this will take longer and should only be used when transferring ownership of the device.

If Windows boots successfully after recovery, the wimboot installation is complete. Enjoy!