Walkthrough 2


The test system contained one hard disk with just one partition, which contains the Windows XP installation to be copied to the disk image. A Windows PE disk with ImDisk installed will be used to create and mount the disk image and copy the XP files. No other tools are required, with the exception of the firadisk driver.

WinPE 3.0 (built using the WAIK) was used - Imdisk can be installed at runtime (crtdll.dll must be present in the \Windows\System32\ directory if installing at runtime). For instructions on building a WinPE 3.0 boot disk see here. Other PE builds can also be used (LiveXP, BartPE, etc).

Note - the test system contains only one drive/partition, the disk image will therefore be located on the same partition as the Windows XP installation we are copying. Consequently the name of the disk image must be added to an exclusion list before running the xcopy command.

Note - this method will allow the RAM loaded XP installation to use a full pagefile. By editing the registry in the system hive the pagefile will remain on device (hd0,0), despite this device being mounted as drive D: by the RAM booted XP.

  1. Boot the Windows XP installation on (hd0,0) and prepare the Windows installation for copying - install firadisk, disable system restore and hibernation but do NOT change the pagefile settings (follow the instructions here).
  2. Reboot the computer and boot into WinPE.
  3. Assuming device (hd0,0), the Windows XP installation being copied, is mounted as drive C: - delete all files in the C:\Windows\System32\dllcache\ folder.
  4. Note - If ImDisk is not pre-installed then install now.
  5. Use the following command to create and mount a 1 GB disk image (C:\my_disk.ima) as drive R: (adjust the parameters to suit your own needs - see here) -
    imdisk -a -s 2104515b -m R: -f C:\my_disk.ima -p "/FS:NTFS /C /Y" [enter]
  6. Create text file C:\exclude.txt in notepad, containing the following text (Note the last line to exclude the disk image from being copied to itself - edit this to reflect the name of the image file you are using) -
  7. Use the following command to copy the XP installation from drive C: to drive R: (the mounted disk image) -
    xcopy C:\ R:\ /exclude:C:\exclude.txt /e /c /i /h /k /x /y /w [enter]
  8. Load the SYSTEM registry hive in the mounted disk image as HKLM\firadisk using the following command -
    reg load HKLM\firadisk R:\windows\system32\config\system [enter]
  9. Start regedit and browse to the HKLM\firadisk\MountedDevices key, then delete all values except \DosDevices\C:
  10. Edit \DosDevices\C: value by right-clicking on it and selecting Rename, then rename as \DosDevices\S:
  11. Browse to the HKLM\firadisk\ControlSet001\Control\Session Manager\Memory Management key and edit the PagingFiles Value - change C:\pagefile.sys to use the same drive letter as in the previous step - S:\pagefile.sys. Do not change the two numeric values
  12. Unmount the HKLM\firadisk hive (R:\Windows\System32\config\SYSTEM) by entering the following command at a command prompt -
    reg unload HKLM\firadisk[enter]
  13. Open R:\boot.ini and edit the paths to ensure that multi(0)disk(0)rdisk(0)partition(1) is used
  14. Unmount the disk image using the following command -
    imdisk -d -m R:[enter]
  15. Add an entry to menu.lst -

On the test system Windows XP booted successfully from the disk image. The booted disk image was allocated the C: drive letter and (hd0,0) was mounted as drive S: (remember that this was manually set (in step 10) by editing the HKLM\firadisk\MountedDevices\DosDevices\C: value). No issues were noted regarding the pagefile - it ran on drive S:.