Moving a Windows Partition - Not yet finished email if you want to read it.

Background

This note came about because I needed to move my own XP partition onto a bigger disk.

I had a 30G disk divided into three 10G partitions one carried Windows ME (my previous system), one carried XP (my current windows system), and the third carried a backup area formatted as Fat32.

Two things happened;

1. After loading yet another package I got a warning that I only had 200M left in the system partition.

2. The disk started playing up.  It occasionally made "finger nails down a Blackboard" noises whenever I powered up the machine, but was usually OK if I "turned it off and turned in on again".  But one day it took four attempts to get it to boot correctly and when I loaded Spin-Rite 6 to check it out, I got a warning about the immimnent failure of the disk.  I figured it was time to swap the disk, and as I had a compatible 120G disk in the cupboard, I thought I'd swap it.

 

I thought this would be easy, my PC has a Linux partition on a second disk so I thought the process would be:

1. Install the 120G disk as a third disk in the system, and partition it as I needed.

2. Boot linux, and copy all the data on the existing XP partition into its new home on the 120G disk.

3. Boot the new XP partition on the 120G disk and tidy up.

How wrong can you be!

 

Lessons Learned

It is not suffient to make an exact copy of a windows partition on another disk and start it up - Windows doesn't like it!.  It seems that Windows has "Relationship problems":   When Windows is initially loaded onto your computer it makes a note of serial numbers and any other identifying information it can locate about every device attached to the system that it can find, so that it forms a kind of "identity relationship" with all its hardware.  I guess that's why the initial installation takes so long.  From then on, whenever it starts up it can tell if new hardware has been added or taken away, and makes decisions based on that knowledge.

I assume that somewhere inside Windows is a Microsoft list of all the changes that Windows will tolerate, and, more importantly, all those it will not.  I am guessing that the ones it doesn't like are the changes that could indicate an attempt to circumvent the Microsoft License: and changing the partition and disk that carries the system drive has got to be in that category.

So to get an image working you need to alter the database it keeps of all its hardware. If you make large changes to that database Windows will refuse to start, but if you make small changes Windows seems to assume there has been some kind of minor error and replaces the missing data.  So the secret seems to be to change just the data it keeps about the system disk and Windows sorts itself out.

Summary

This is the sequence that actually works:

  1. Mount the new disk in the system alongside the old disks. Boot XP and use it to partition and format the new disk.
  2. Boot Linux and use the "dd" utility to copy all the data in the existing XP partition to the new partition.  [ In order to do this you need a Linux that can mount an NTFS partition read/write. At the time of writing (June 08) not all Linux releases have this facility built into the kernel, so you may need to load "ntfsmount" software.]
  3. Edit the Volume Boot Record (the first 512 bytes of the partion). You will need the "dd" utility as well as a Hex editor and a calculator that can switch between decimal and hex. You need to install in position "1C" of the VBR the correct starting place of the partition.   It is part of the Bios Parameter Block of the Volume and contains
  4. Edit the file boot.ini in the root of the newpartion to reflect to drive and partition number on the new disk
  5. Edit the registry

This is all very complicated and my notes don't make a lot of sense sometimes..

The process

So, in my case, I made the exact copy and by way of a test, booted XP on the new partition. It worked fine, so I took out the old disk replaced it with the 120G and booted up. The system failed to boot.

Top Return to Top of Page
About Us | Contact Us | ©2006 Bazaar Systems Limited