Sunday, August 30, 2015

Using the Windows Vista recover partition to install to a new hard drive

Alas, the hard drive died and Windows vista no longer boots.  How to get it installed on a new hard drive using only the recover partition from the old one.

  1. Attach a USB drive with at least enough free space to hold the recover partition.
  2. Boot using puppy linux
  3. Mount the USB drive (assuming sdc1 and also assuming the recover partition is sda2
  4. Create a directory called recover on the usb drive
  5. Copy the partition using dd: dd if=/dev/sda2 | gzip -c | split -b 2000m - /mnt/sdc1/recover/recover.img.
  6. Turn off the computer
  7. Replace the old hard drive with the new one
  8. Boot again
  9. Using Gparted (System -> GParted Partition Manager)
    1. Create 2 partitions
    2. Make them both ntfs
    3. Use manage flags to mark the second one 'boot'
  10. Copy the partition" cat /mnt/sdc1/recover/recover.img* | gzip -dc | dd of=/dev/sda2
  11. Mount the sda2 drive
  12. Run ntfsfix /dev/sda2
  13. Run Grub4Dos