Enabling 10-15 Minute System

"Re-Install" With Windows XP

 

(blame Ren Ng if you have problems with this)

 

Note: This information has not been extensively tested.  It is based on a few ad-hoc tests of Windows XP's System Restore -- tests which seem to work reasonably.  Please update this document with your own findings if you choose to make use of this technique.

 

Note: This is not available on Windows 2000 or earlier versions of Microsoft operating systems.

 

The purpose of this document is to describe how to set up your system so that you can easily return to a state in which you are sure that your OS and application files are in a good usable state.  Sadly, I have come to the conclusion that regular "re-installation" is the only way to ensure system stability.   Ideally, you would be able to roll your system back in the middle of a SIGGRAPH crunch, taking only 10-15 minutes to do so, and have it work correctly.

 

True re-installation (formatting and OS installation) is the Linux-based way of achieving what is described here.  This works, because the Linux install is easily automated, and user preferences and settings are separated (often on a different logical drive).  For Windows, re-installation is often not a legitimate option, because automated install is difficult, and manual installation is very tedious.  I took 2-3 days to install Windows XP, find all the appropriate drivers for my laptop, and configure my build environment, latex environment, and install all my applications.

 

Fortunately, Windows XP provides a feature called "System Restore", which, apparently, enables rollbacks of all disk data (aside from application data with known file endings and data in the "Documents and Settings Folder") to saved points in the past.  The idea is to set your system up exactly the way you want it (once), then enable System Restore with a large amount of allocated restore cache so that you will be able to restore it to the current "perfect" state anytime in the future. 

 

System Restore

Rather than decribe this in detail here, read the following:

  • Start->Help and Support
  • Search for System Restore
  • Read System Restore Overview, and other articles found by the search.

This describes what functionality System Restore provides, and how to use it.

 

System Restore Cache Size

One drawback to System Restore is that it does not guarantee that you will be able to restore your system to any point in the past, if it runs out of disk space to store the differences from the current state of the system.  Thus, if you install a lot of software, or make substantial changes to your OS disk partition over the course of time, you will run out of System Restore cache, and you will start eating away at the earliest available restore point. (When I had my system set up with one partition for both data and OS, and I was generating GB's of binary data every week, my System Restore only extended 2 months into the past with 12% of the disk devoted to System Restore cache.)

 

The knowledge base article (295659) describes the Windows registry keys involved with System Restore.  The important one is DiskPercent, which you might want to set to something quite high (say 40%).

 

Configuring Your System

Okay, here's the synopsis of what to do:

  1. Physically re-install Windows XP by formatting your hard drive and putting Windows XP onto an 8-10GB partition.
  2. Turn off System Restore.
  3. Install all your applications onto the OS partition.
  4. Create a second (data) partition with the remainder of your hard drive.
  5. I like to disable the C drive swap file, and, before putting any data on the new data partition, create a fixed, unfragmented, 2 GB swap file on the data partition.
  6. Search the registry (regedit) for System Restore, and change the DiskPercent key from 12 to 40 (or higher).
  7. Turn on System Restore for the OS drive and disable it for your data drive.
  8. Keep using your system until all your settings are nice, and periodically make a System Restore point and describe it so that you will know to return to it in the future.  Note, however, that the first few restore points will likely be the best because they will be closest to the fresh install.
  9. Try not to make changes to the OS partition; do your work on the data partition.  If, in spite of this discipline, the system starts to become unstable or sluggish, try System Restore to return it to an early state.  Cross your fingers and hope that this works.  If it doesn't, then you may still have to do a physical re-format and re-install.

Note: I have found XP to be pretty reliable.  When I say "unstable," I mean that the system starts to feel sluggish (Windows take a while to come up), Windows Explorer starts to segfault periodically, or applications that have memory problems (e.g. during development), cause the system to pause interminably while it invokes the debug handler, etc.  However, I have never encountered a problem where the OS was physically unusable.  This document is meant to address these "minor" versions of OS rot, not the (thankfully now uncommon) cases of debilitating failure.