Share |

3.5 Manually cloning a Windows installation

This method describes how you can migrate a Windows installation to another computer and be sure it will boot as long as the Windows installation itself is not corrupt. Additionally, I will also describe how you could make your system bootable again with only a single computer/disk available.

The way we approach this type of "cloning" is very simple: we create a fat32 partition, copy all data from the NTFS partition to it, let the Windows bootcd repair the MBR and bootsectors and Windows boots. Afterwards you can convert the filesystem back to ntfs from Windows.

The procedure

Let's assume a few things first: you have two harddisks attached to 1 PC one of which might be dieing or chkdsk does not repair it and you can not use any cloning tool because it finds errors and exits (happens with Ghost and PQ Drive Image). In the case of a laptop computer, you do not have the possibility to attach a second disk unless via an external USB enclosure, which is not recognized under dos based utils.
In TRK you can either mount a remote disk with two PCs running TRK of which one is running in fileserver or secure shell server mode (see other sections on how to do that). The possibilities are myriad.
But our example here works with two local disks, the source disk being an NTFS partition, the destination disk empty or erasable.
Disks are respectively /dev/hda and /dev/hdb, the NTFS partition is /dev/hda1
-Make a large enough vfat filesystem on /dev/hdb. Use qtparted to do it graphically or use…

'fdisk /dev/hdb',
-'n' to create a new primary partition
-'t' to toggle, code 'c'
-'a' set active '1'
-'p' to print all that is about to be done to the screen
-'w' to write and quit the partition table
-'mkdosfs -F 32 /dev/hdb1'
-cp -a /hda1/* /hdb1
-Shutdown the PC, change the harddisks so your new disk becomes the primary (/dev/hda)
-Now, reboot with the Windows CD so we can make the disk bootable (I have found it to be the best way).
Follow the procedure described in
3.4 Bootsector repair .i.e. fixboot and fixmbr.

Your Windows should now start. Once booted into windows, go to a command line and run 'convert c: /fs:ntfs'
Reboot and let your disk convert to ntfs

I have noticed that the Linux 'cp' makes the windows systemdir (in most cases named WINDOWS) into lowercase. It is good practice to make it uppercase afterwards. Although Windows is supposed to be case independent (but still case aware), I've noticed that some services would not start until I uppercased it
-'cd /hdb1'
-'mv windows/ WINDOWS/'

One note here: Windows XP will not boot from FAT 32 partitions larger than 32Gb. So do not create them bigger than this. If you have more data to copy, I suggest you move your big files somewhere into a directory that you then omit copying.

Updated: July 28, 2010