Monthly Archives: July 2015

WinPE – Dual Boot External USB Drive

It’s always a good habit to back-up your computer; the saying goes that computers’ users could be divided into two groups: ones that do backup and the others that are sorry.
This post is the fourth one in the series of posts about Microsoft WinPE (i.e. Windows Preinstallation Environment is a minimal operating system with limited services, built on the Windows kernel). In my second post about WinPE 5.0 GUI, I had provided information and scripts about the requirements and steps to be taken in order to build an interface for WinPE using Microsoft PowerShell.

LaptopWitDrive

ImageX is a command-line tool that enables original equipment manufacturers (OEMs) and IT professionals to capture, to modify, and to apply file-based disk images for rapid deployment. I am sure that everyone could use ImageX to do a backup. ImageX allows you to take complete backup of a Windows® volume and save an image to a file. You can then restore any system with its original image in just a few minutes as long as you apply it on the same hardware.

 Note:The solution explained in this post provides scripted way to capture, and to apply file-based disk images using ImageX.exe tool. It does not provide scripted way to use Sysprep, a tool used (by IT professionals) to configure new installations of Windows for duplication, prior to capturing image by ImageX. You could use my WinPE – Dual Boot External USB Drive application on a computer without running Sysprep /generalize to backup your computer’s Windows® partition. Moving or copying a Windows image to a different computer with different hardware without running sysprep /generalize is not supported.

There is an ongoing SID debate: to Sysprep or not to Sysprep. Mr. Mark Russinovich, a software engineer and author who works for Microsoft as a technical fellow, has addressed this issue in his blog: http://blogs.technet.com/b/markrussinovich/archive/2009/11/03/3291024.aspx

My position is that you can capture a non sysprepped image of your home computer or a workgroup computer. You should capture a non sysprepped image of a reference computer just prior to running Sysprep tool, and you have to sysprep an image in Active Directory / Windows Server Update Services (WSUS)) domain environment.

To determine whether a computer system has previously been sysprepped, look under the following registry key: HKEY_LOCAL_MACHINE\System\Setup

If you find a value named CloneTag under this key, the system has been sysprepped (i.e. generalized) and the value of this key will tell you when this was done (https://support.microsoft.com/en-us/kb/180962).

How the WinPE – Dual Boot External USB Drive gets installed

  • You need to have Windows ADK 8.1 installed; download the Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update here: http://www.microsoft.com/en-us/download/details.aspx?id=39982.
  • Download WinPE-DualBootExternalUSBDrive.zip package from the download section, under Application folder. After you download the file, please do the following:
  1. Unzip the file (for example C:\ WinPE-DualBootExternalUSBDrive).
  2. Connect your external USB Drive to your computer.
  3. Find the Create-DualBootExternalUSBDrive_x64.exe file (there are two files: one for 32 bit and one for 64 bit architecture, I am using in my example the 64 bit executable).
  4. Ran as administrator the Create-DualBootExternalUSBDrive_x64.exe tool in order to create Media files that are necessary to make the external USB drive bootable.

This is a two steps process, please see the picture below:

CreateDualBoot_01

Picture 01: in the first step you will create Bootable Media files

During the first step, please select the folder named WinPE-DualBootExternalUSBDrive by clicking ‘Browse Source’ button, and once this folder is selected, please click ‘Start’ button to start creation of the Media files (i.e. the files and applications essential for dual booting USB drive). Please do not close PowerShell Command line windows as shown below.

CreatingMedia_01

Picture 02: Media files being created, do not close command line window

Once all Media files are created, please proceed to the second step in order to make USB Drive bootable. First click on ‘View USB Drive(s)’ button to display all available USB drives; select one or more USB drives form the list, and (for ones that you want to make bootable) click ‘Run’ button. See the pictures below. Please note that this process will delete any data previously stored on the selected USB drives.

CreateDualBootUSB_01

Picture 03: selected external USB Drive is being formatted

CreateDualBootUSB_02

Picture 04: Media files are copied to the selected USB drive

Finally, at the end of the second step, you will have a bootable USB drive. If you explore the contents of the newly created USB drive you will see the list of folders as displayed in the picture below.

USBDriveFolders

Picture 05: List of folders and files on the newly created external USB drive

Please do not delete any of the listed folders; note the ‘Images’ folder (with two subfolders: 32-BIT and 64-BIT) which serves as a container for all 32 bit and 64 bit images and the ‘Owner Files’ folder, which purpose is to house all the data files that you want to have stored on the external USB drive.

How WinPE – Dual Boot External USB Drive works

To see how your external USB drive works, please connect it to your computer (IMPORTANT: you should not connect/plug into your computer any other USB drives except this one), power up the computer and press the key that will display the boot option menu. After you get to the boot menu, locate the bootable USB device and then choose USB drive to boot from.

Please remember that we have dual boot USB drive, and at the very beginning you will have to choose to boot into either “WinPE5.0_x86–32BIT” or “WinPE5.0_x64–64BIT”. In my example, I select 64 BIT option and with this option the ‘Images\64-BIT’ folder on external USB drive is predetermined to house all my captured images and/or to display the ones previously captured.

As soon as the computer finalizes booting into external USB drive, the application with three tabs appears: Computer Info, Create Image and Apply Image. On all tabs there is an image, named “Computer Hard Drive”, courtesy of “FrameAngel” at FreeDigitalPhotos.net.

The first tab, The Computer Info, displays info about computer’s hardware (make, model, serial, NIC, etc.) and the content of the external images folder. By clicking on ‘Delete’ button, you can delete the checked image files and their descriptions; the rest of the buttons you can use to refresh displayed info, to restart or shutdown a computer.

WinPEusb_ComputerInfo

Picture 06: displays info about computer’s hardware and captured images inside Images folder.

The second tab, Create Image, as shown in the picture below displays the process of capturing an image. You have to provide the name of the image file while the description is optional. I would strongly suggest that you always provide a description for an image in a form of an answer to the 5Ws.

WinPEusb_Capture

Picture 07: displays the process of capturing an image.

The third tab, Apply Image, lists all the previously created images that you can use with this WinPE. For example, you would first select an image file and click on ‘Apply’ button to start the process of applying image on the computer’s hard drive as shown in the picture 08.

WinPEusb_Apply

Picture 08: displays the process of applying selected image file.

Important: when you apply an image, the computer’s hard drive will be formatted; the scripted process creates two partitions, a hidden one that is 300 MB in size (i.e. system reserved partition used for bootmgr and bitlocker), and the remaining hard drive space is used to create a second partition. At the end the script makes Windows partition bootable.

WarningMessage

Picture 09: Warning message – only one drive detected.

To download the WinPE – Dual Boot External USB Drive application, please go to the site’s download section, and expand the Application folder.





Please note: Although the author has made every reasonable attempt to achieve complete accuracy of the content, he assumes no responsibility for errors or omissions. Also, you should use this information as you see fit, and at your own risk.