Copy of an XP system from one volume to another
volume as another bootable XP system.
vers page en franšais
It is useful to have several operating systems and to be able to copy systems:
It is possible to do a backup (as a new operating system) Restoration is not needed when the backup can be operated.
It is possible to test several version of a program in separate systems
If an update (new version of a program or of an operating system) does not operate correctly it is possible to use the old version and also debug the new one.
All these possibilities are cheap:
The storage of a full system cost around $10 of hard drive space.
There are free programs to copy systems and to boot a system among several systems.
The time to copy an entire system is around 10 mn with a recent computer.
The system copy is easy for Windows Me but with Windows XP it is
more difficult to obtain (by copy) several systems.
Each disk has a signature (written on the disk) and each volume has an identifier (written on the volume, specific to the disk and the volume). The registry assigns letters to identifiers (at install or when a new disk is added).
When a new disk is added: the registry assigns or reassigns letters not in use at that time to the volumes of the new disk (even if the letters have been already assigned to a disk now absent). When a new disk is added all the disks already recognized must be present.
If a drive is cloned (and if you keep the old disk in the system) there will be duplicate disk signatures and duplicate volume identifiers. To boot on a new cloned drive you must take of the old drive (for the first boot)
When a system on a source volume is copied to a destination volume, the registry of the destination volume points to many files on the source volume (the volume letters do not change in this registry). It is possible to boot to this destination volume only if the source volume is present. It is not safe to operate a long time in this state because this may damage both systems as some files are common.
I try to describe a method to copy an XP system (it is perhaps not the best one).
I don't use drive cloning but I copy the partition using savepart with the option "copy of the occupied sectors only". This tool can copy FAT32 or NTFS partitions
1 Preparation of the hard drives.
It is better to have on each disk three primary partitions of the same size. Itis convenient to namethe volumes with the rank of the partition and the name of the disk.
2 Preparation of the tools
Create a dos boot floppy as explained at http://www.partition-saving.com ( FAQ). and add savepart.exe. The CDROM driver is not useful, the mouse driver is usefull.Create a boot floppy to boot an XP with a corrupt boot.ini. This floppy has only three files: Ntldr,Ntdetect.com and an universal boot.ini hereafter:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro disk 0 partition 1" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Pro disk 0 partition 2" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP Pro disk 0 partition 3" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Pro disk 1 partition 1" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Microsoft Windows XP Pro disk 1 partition 2" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(1)partition(3)\WINDOWS="Microsoft Windows XP Pro disk1 partition 3" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="Microsoft Windows XP Pro disk 2 partition 1" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(2)partition(2)\WINDOWS="Microsoft Windows XP Pro disk 2 partition 2" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(2)partition(3)\WINDOWS="Microsoft Windows XP Pro disk 2 partition 3" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(3)partition(1)\WINDOWS="Microsoft Windows XP Pro disk 3 partition 1" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(3)partition(2)\WINDOWS="Microsoft Windows XP Pro disk 3 partition 2" /fastdetect /noexecute=optin
multi(0)disk(0)rdisk(3)partition(3)\WINDOWS="Microsoft Windows XP Pro disk 3 partition 3" /fastdetect /noexecute=optin
Do not use /noexecute=optin for the XP systems before SP2
3 Preparation of the source volume
Boot on the source volume and check the boot letter (this letter must be used later). If there are several hard drives note the rank of the drives (in disk management) this is useful to write a correct boot.ini. The boot disk is the drive 0 the rank of the others is primary master primary slave secondary master secondary slave.
It is better to suppress system restore and indexing service for all volumes and to keep on the source volume pagefile.sys and all programs or files referenced in the registry. This floppy can boot an XP system which has lost one of its boot files (ntldr boot.ini ntdetect.com) it is useful for a first boot on a system when the boot.ini does not point to this system.
4 Copy of the files from the source volume to the destination volume
Boot on the savepart floppy, type savepart, chose "copying element", chose the source, choose "occupied sectors only", chose the destination.
5 Modifications to be able to boot on the new system on the destination volume
Boot on the source system (If the boot on the source system is not possible use the boot floppy.) The destination volume has now the same name as the source volume, modify its name (its letter may help to find which is the old one or use the disk management). Add lines for the new system in boot.ini which must point to the new volume and new drive. See Reviewing and Correcting Boot.ini Settings on x86-based Systems and boot.ini example.
6 Modification to be able to run the new system
Boot on the new system on the destination volume in safe mode (if it is not possible use the above boot floppy).
The letters of the source volume and of the destination volume must be swapped in the registry of the destination volume in use.
For that use the Knowledge Base article Q223188 ( regedit : HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices, right click on volume, chose rename for instance C to Z, D to C, Z to D, reboot). Then the new system does not need the source volume.
Any other operation may corrupt both systems.
If necessary check the boot letter.
Verify errors in the events journal. Then the new system does not need the source volume and is fully operational
Remark: It is not possible to chose the operating system boot partition letter: it is necessary to use the letter for which the registry operates normally. (It is the letter of the operating system boot partition when this XP system has been installed, letter which is used in many registry keys)
7 Boot on any primary partition
To separate completely the volumes I prefer:
-to choose the drive in the bios,
- to use a small boot manager in each MBR in order to choose the boot volume in each drive,
-to place in each volume ("operating system boot partition") XP boot files (Ntldr boot.ini Ntdetect.com) so each partition can become also "system partition" and the loss of a volume does not prevent the boot on another volume. It is not the case if there is only one boot.ini in the computer.
mountvol /? give the volumes GUID
How to check the letter of the registry in use(only useful with several XP systems)
Copy using xxcopy
xxcopy keeps the short files names.
xxcopy ( http://www.xxcopy.com/ ) can copy on a partition smaller than the source partition (version 188.8.131.52 or later runs on XP). But you must run xxcopy outside the system that you want to copy. For instance in XP on another partition or in a floppy after boot on a CD BartPE (BartPE in french) or UBCD4Win
example copy of d: to e: (with run cmd)
xxcopy d:\ e:\ /clone /exlist.lst /onerror.txt (this command suppress all the files initially on e:\)
the text file list.lst contains three lines which are the path to three files which must not be copied: (/exlist.lst is not necessary)
"d:\System Volume Information"
/onerror.txt asks to save the list of errors in the file error.txt
A small boot manager for basic disks
The small boot manager described afterwards is entirely
written on the MBR its operation is not modified when operating
systems or even partitions are modified or copied. Sophisticated
boot managers are installed in partitions or in operating systems
and if you want to copy operating systems or to change partitions
it is necessary to adapt the boot manager.
I have modified the John S. Fine's program smbmbr.asm at http://my.execpc.com/~geezer/johnfine/
The modified version smbnew.asm can be used with disks above 8 Go and with Windows XP (disk signature)
The boot disk must be chosen with the bios
Smbnew can boot only on one of the primary disk partitions (cannot boot extended partition).
Smbnew.asm can be modified compiled and linked easily in the same manner that John Fine explains for the original version smbmbr.asm. You can also install directly the binary file smbnew.bin: this is explain below.
Only four choices:
Type 1 to boot on the first partition,
Type 2 to boot on the second partition,
Type 3 to boot on the third partition
Type 4 to boot on the fourth partition
If no entry : boot on the last partition used
Once installed it does not need modifications if partitions are modified or if operating systems are copied, transferred: no risk of errors.
Before to boot on a floppy (or CD ROM), boot before on the
disk partition which must be active
(even if not yet bootable: it is only to activate this partition in the MBR)
At boot are displayed:
- the last partition used (To boot on another partition enter the partition number)
- "SMBMBR" (If you have several disks it is recommended to replace "SMBMBR" by the name of the disk. This can be done directly in the .bin file without compiling and linking)
- a beep is emitted to ask for a key
- the partition effectively booted (or error messages)
- "1 2 3 or 4 only ": you have entered a key which is not - 1 2 3 or 4 try again
- "no partition " the key is accepted but no partition exists on the disk for this key, try again
- "disk error" : cannot read or write the disk
other messages are from the bios or from the booted partition.
Modifications possible without compilation
Replace smbmbr by the name of the disk . Some delays can also be changed.
See XP documentation on Master Boot Record on Basic Disks
Prepare a dos boot disk with minimal files (like to flash a bios) see http://www.bootdisk.com/
Add the following files:
- partcopy.exe http://my.execpc.com/~geezer/johnfine/pcopy02.zip
- a small disk sector editor (like diskedit )
- the binary file smbnew.bin to be transferred to the MBR (modified for the name of the disk)
After a boot on the floppy
Save the beginning of the disk on the floppy
partcopy -h0 0 10000 original.mbr
As another backup, copy the original first sector of the disk on for instance the fifth sector
partcopy -h0 0 200 -h0 800
Install the binary file on the MBR
partcopy smbnew.bin 0 1b4 -h0 (1b4 is the length of the copied zone)
As a backup copy the new first sector on for instance the fourth sector
partcopy -h0 0 200 -h0 600
and the beginning of the disk on the floppy
partcopy -h0 0 10000 smbnew.mbr
To install on a disk it is better to remove all other disks (for instance disconnect the small power connector).
Use the disk editing program to check the beginning of the disk before and after a write operation : The end of the first sector (1b4 to 200) must not change. If it is modified all the disk data may be lost.
It is safer to experiment when adding a new empty disk. In this case and if after unsuccessful experiments the disk cannot be partitioned with fdisk it is probable that garbage has been written in the partition table. To recover the disk, erase the
partition table or the first sector of the disk with a small disk editor
May be necessary for instance after a new XP or Me installation (which writes a new MBR ). To modify a MBR on a disk it is better to remove all other disks. After boot on the smbnew installation floppy it is useful to read the MBR with the small sector editor to know what is modified (boot manager or partition table). To restore smbnew from the file on the floppy type
partcopy smbnew.mbr 0 1b4 -h0
To restore from the fourth disk sector type
partcopy -h0 600 1b4 -h0
It is possible to restore also the partition table and the signature (all the sector: partcopy -h0 600 200 -h0) but be sure that the backup is recent: a partition modification could have be done since the last backup (for instance FAT32 to NTFS).
Modifications with compilation and link
See http://my.execpc.com/~geezer/johnfine/ same operations can be done with the new source smbnew.asm
boot.ini for several XP with XP menu without small boot managerIt is the classical configuration
|Letters after boot
on one of theses 7 primary partitions
One XP system installed as C:\ then 5 copies of this XP
Windows Me sees only the three Fat32 partitions
boot.ini for each XP with a small boot manager without XP menuAn example to boot on the second partition of the boot disk without XP menu:
boot with XP menu or with a small boot managerThe default boot disk (default system partition) has a usual boot.ini with a menu (see above) the other XP volumes have a simplified boot.ini (and Ntldr and Ntdetect.com)
may 10 2011 email@example.com___________