8/04/2009

HOWTO: Creating a Cloning Edition of Microsoft Windows XP

Rationale

Different from Windows XP, Windows Vista introduces a new installation method, the image cloning method. During the installation procedure, the whole file system will be "cloned" to the target partition, which is much faster than the file-by-file copying method used by Windows XP. Windows 7 inherits that feature.

However, at the present, it is still a safe conclusion that it is impossible to completely abandon Windows XP. Many computers, especially those "living" in developing countries, equipped with a CPU of about 1.5 GHz and RAM of about 512 MB, are powered by Windows XP, to better serve people. And the installation process is a disaster.

Imagine how many employees in small companies still running Windows XP are suffering from slow installation, and how many children who cannot afford to buy a new laptop to run Windows 7 are frightened by the reinstallation catastrophe again and again.

So, if a cloning edition of Windows XP is available, people will be happy. And I will tell you that, it is possible. Do you think I'm over talkative? You've got the point.

Let's hark back to the subject. The Sysprep utility, officially provided by Microsoft, is designed to meet the demand for mass deployment. And we will take advantage of that tool.

In the end, keep in mind, never, never make pirated software.

Prerequisites

  • A computer (will be called the reference computer, and can be a virtual machine)
  • A genuine copy of Windows XP Professional (Home Edition is not supported)
  • A cloning program
  • A person with firm determination and strong confidence to create a cloning edition of Windows XP (Don't punch me. I won't blah any more again!)

Procedure

  1. Install Windows XP on the reference computer.
  2. Log out to the welcome screen. Press Ctrl + Alt + Del twice, and log in as Administrator, the ultimate ruler of this computer.
  3. If you have created accounts other than Administrator and Guest, delete them, as well as their account profiles.
  4. (Optional) Install applications that you wish to include in your cloning edition.
  5. Download the deployment tools here.
  6. Extract the archive to C:\Sysprep, since those tools are useless to end users and that location will be automatically deleted during the first boot of the new system.
  7. Run Setupmgr to create an answer file, i.e. Sysprep.inf. Information omitted in that file will be retrieved by querying the end user during the first boot.
  8. Run Sysprep. Remember to enable mini-setup and non-PnP detection, and set the computer to shutdown after the reseal procedure. Finally, click "Reseal".
  9. (Optional, but recommended) Boot the computer with another operating system. Delete the page file, hibernation file and the account profile of Administrator.

The remaining work is a simple imaging task. Use your favorite imaging software to make an image of the system parition. It's great! Now you can clone this Windows XP to any computer.

(Actually not all computers will successfully boot after the cloning. The target computer is required to be "HAL-compatible" with the reference computer. However, most desktop computers fulfill the requirement.)

Troubleshooting

MBR Problem

The MBR is the first 512 bytes of a hard disk, of which the first 446 bytes are booting code, the following 64 bytes the paritition table and the last 2 bytes the signature. When restoring the image to the target computer, the cloning program may or may not restore the MBR, while in both situations problems could occur.

If the user buys a new computer without an operating system and the cloning program does not restore the MBR, the computer cannot boot, though there is a complete Windows XP on the system partition.

If the user installs Linux on the computer and the cloning program does restore the MBR, the computer boots directly into Windows XP. Linux becomes inaccessible.

The problems in both situations can be fixed in a minute, but it is unsound to expect all end users to have that ability.

So what should we do? Nothing. Because the MBR problem is caused by the intrinsic deficiency of the design of the ancient MSDOS partition scheme, which we are still using.

However, some cloning programs are able to settle that problem parcially. For instance, partclone puts different booting code into the MBR depending on whether it detects GRUB or NTLDR.

Active Partition Problem

The active flag, or sometimes called the boot flag, is a flag set to the partition containing the Windows operating system. On an occasion that the image is cloned to a new computer, and the cloning program does not set the target partition active, the computer will fail to boot. You need to set that manually.

No comments:

Post a Comment