Clicky

Support Document: Using SysPrep when Migrating Boot Camp

Using SysPrep when Migrating Boot Camp

Overview

Migrating a Boot Camp partition can be a complex undertaking, mainly due to hardware differences that can render Windows unstable on a new system.

This document covers how to use SysPrep to prepare a Windows installation to migrate between different Mac models. It mitigates the problem of altering and removing Microsoft validation by creating an image of the source partition prior to running SysPrep. This allows you to "snap back" the Windows system to the pre-Sysprep state in case of issues. However, it is not a replacement for backup and any critical data should be backed up to other storage media prior to attempting these operations.

A detailed overview of SysPrep is beyond the scope of this article, and it is important to understand that there are limitations to this method and that Windows cannot be generalized for all hardware. This limitation can cause SysPrep to fail, or to fail to boot after restoration. Also, SysPrep makes changes the source partition and may require the original Windows installation disk to check for authenticity.

Creating a Window Image

Prior to running SysPrep, create an image of the source Windows Boot Camp installation. You will need an external drive, formatted as HFS+ (Mac), that is large enough to hold at least two copies of the source image. You can estimate the size required by looking at the used space in the Windows partition, then make sure the storage drive contains at least double available space.

Prior to creating the image, make sure to run CHKDSK to verify any issues following the tutorial "Checking a Windows Disk for Errors"

http://www.twocanoes.com/support/winclone/checking-a-windows-disk-for-errors/

Open Winclone

Launch Winclone, and your current Windows partition should appear in the Sources list.

Imaging the Bootcamp Partition

You are now ready to create an image of the Boot Camp partition.

  1. Select the Bootcamp partition.

  2. Click Image

Memory Caches

Windows keeps a large file called a pagefile.sys on the Bootcamp partition. This file takes up a lot of space and is recreated on startup. However, if a drive is already failing or has corruption on it, deleting files may cause issues. Select to Keep Cache Files or Remove Memory Cache Files.

Save

Give the image a name, and save it to a Mac-formatted external drive.

Image Creation

The winclone image will now be created. Depending on the size of the Boot camp partition, this may take a while.

Completion of Image Creation

A confimation window will appear once the image process has completed.

Running SysPrep

Now that we have a valid Winclone image, restart into Windows and login. Navigate to c:\Windows\System32 and run sysprep.

SysPrep Options

Select the following options in SysPrep:

System Cleanup Action: "Enter System Out-of-Box Experience (OOBE)"
Select the Generalize button
Shutdown Options: Shutdown

This will reset all the drivers to be rediscovered on next startup.

Sysprep

SysPrep will now generalize the system and shut down.

Addressing the Sysprep "fatal error" issue

Occasionally, Sysprep will not run to completion and abort with the following message "A fatal error occurred while trying to Sysprep the machine". This error is due to a running process which must be shut down before Sysprep can remove the file during the generalize process. This process is the WIndows Media Player Network Sharing Service.

You may need to elevate to Administrator privileges to take this action. To turn off Windows Media Player Network Sharing Service, click the Start button an in the Run box, type services.msc, which opens the Services MMC Console. In the list of Services search for Windows Media Player Network Sharing Service, right-click and click on Stop. Alternately, you may use the Command prompt (elevated to Administrator) and type: net stop wmpnetworksvc.

Then run Sysprep again and it should complete the generalize process successfully.

Creating a Winclone image

Follow the steps to migrate the Winclone image in document "Migrating a Bootcamp Partition with Winclone":

http://www.twocanoes.com/support/winclone/migrating-a-bootcamp-partition-with-winclone/

Post-Restore SysPrep

After the Winclone image has been restored to the new Mac, SysPrep will run on first start and attempt to discover the new hardware. Make sure that you unplug any external hardware such as keyboards, mice, external displays, and removable drives. It is critical to get Windows to discover only the hardware needed for startup. If SysPrep fails when discovering hardware and you have any external devices connected, restore the Winclone image again and make sure all external devices are disconnected.

Installing New Boot Camp Drivers

You may receive a warning after Windows Setup that the Boot Camp drivers are not compatible with the hardware and should be updated. To update the Boot Camp drivers, boot into OS X and run Boot Camp Assistant. Select the option to Download the latest Windows support software from Apple, and follow the instructions to download the drivers. Reboot into Windows and install the drivers.

In Case of Issues

Using SysPrep on the source partition can fail for a number of reasons:

1. Windows 7 only allows SysPrep to be run 4 times on a single image. Depending on your Windows license, you may be able to reset this counter. See Microsoft technotes for more information.
2. Windows cannot be generalized for all hardware. This can cause SysPrep to fail, or to fail to boot after restoration. If this is the case, you can restore the initial Winclone image back to original Mac hardware, and then migrate the data manually after installing Windows on the new Mac.