Easiest way to move my Windows installation to an SSD?

ImageX is a free tool that is part of the Windows 7 WAIK (download). It is what we use for imaging machines at work. It can even be used to create backups of the machine. If you're doing the C drive (you have another drive D, and your SSD is currently set to E), then it would just be a matter of booting into Windows PE, and then

ImageX /capture c: d:\image.wim "bootDrive" /verify /compress fast

That will make a very large file named image.wim on the other drive. You could even map a drive, and put it on the network, which is what we do.

Then, reconfigure the drives to make sure that the SSD is now C:\.

Reboot into Windows PE again, and type:

imagex /apply d:\image.wim 1 c: /verify

Then, after that, it is CRITICAL to run this command, still in PE:

bcdboot.exe c:\windows

that will have it make everything bootable.

If bcdboot.exe fails you might have to mark the partition you copied Windows on as active first using the diskpart utility.


Update:

Open Source imageX wimlib-imagex.exe

wimlib-imagex.exe capture c: d:\backup.wim "OS" /compress fast
wimlib-imagex.exe apply d:\backup.wim c: 

My successful experience:

  • Attach the SSD drive and format as NTFS
  • Boot with the Windows 7 original DVD -> Restore
  • Check the source drive letter and destination drive letters (e.g. E: and H:)
  • Execute:

    ROBOCOPY "E:\Program Files" "H:\Program Files" /MIR /SEC /SECFIX /R:0
    ROBOCOPY "E:\Program Files (x86)" "H:\Program Files (x86)" /MIR /SEC /SECFIX /R:0
    ROBOCOPY "E:\Windows" "H:\Windows" /MIR /SEC /SECFIX /R:0
    ROBOCOPY "E:\Users" "H:\Users" /MIR /SEC /SECFIX /R:0
    BOOTSECT /nt60 H: /mbr
    
  • Detach the old drive and boot again with the Windows 7 original DVD -> Restore

  • Shutdown
  • Swap the drive, power on, select to boot from the new drive in the BIOS

Windows 7's built-in backup feature makes this very easy, as long as you have another (third) drive to store the backup on.

http://www.winsupersite.com/article/windows-7/replace-your-hard-drive-using-free-windows-7-tools

I just did this this weekend, and it worked perfectly.


I just successfully copied my Windows install over to a new SSD yesterday. I knew I wanted to use GParted, but wasn't sure what to do after that. It took me a couple hours to get the computer booting from the SSD after I copied Windows over, so I thought I'd make note of what I did.

Here is what I did:

  • Freed up enough space on my hard drive so that what was on it would fit on the SSD.

  • Downloaded and burned a GParted live CD. It is a Linux based partition editor, but I've found it easy to use and reliable.

  • Put the SSD into the computer.

  • Changed the boot priority in the BIOS to have the SSD at the top (good to verify so you know where you're booting from).

  • Booted to GParted and resized my hard drive's partition to be smaller than the SSD. The resizing took almost an hour. Then I copied and pasted the hard drive's partition to the SSD and resized it to fill the SSD at the same time. Took about half an hour. (Go in advanced mode and consider options, such as --recover, if dealing with a defective disk).

  • I unplugged the hard drive with my old Windows install. You don't have to, but if it is unplugged, then when the computer is booted and the desktop appears, you know everything is working right. (During my attempts when I didn't have the hard drive unplugged, I once booted from the SSD when it was drive E, but the registry still referenced drive C. So I was using E:\Windows from the SSD, but C:\Users and C:\Program Files from the hard drive.)

  • Booted to the Windows 7 install disk and opened the recovery command prompt. The drive letters needed changed so that the SSD's partition is C: like it was on the hard drive. I did this with diskpart. Something like this (the SSD is 111 GB):

** IMPORTANT: If partitions were cloned to new disk, you won't be able to tell them apart while having both disks connected. Simplest thing is leaving a text file in the OS partition saying which drive that is.

    X:\Sources> diskpart

    DISKPART> list volume

    Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
    ----------  ---  -----------  -----  ----------  -------  ---------  --------
    Volume 0     C                NTFS   Partition    465 GB  Healthy    
    Volume 1     D                NTFS   Partition    111 GB  Healthy    

    DISKPART> select volume 0
    ...
    DISKPART> assign letter=E
    ...
    DISKPART> select volume 1
    ...
    DISKPART> assign letter=C
    ...
    DISKPART> select volume 0
    ...
    DISKPART> assign letter=D
    ...

The partition also needed to be set active:

    DISKPART> list disk

      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          465 GB  1024 KB
      Disk 1    Online          111 GB      0 B

    DISKPART> select disk 1
    ...
    DISKPART> list partition

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    Primary            111 GB  1024 KB

    DISKPART> select partition 1
    ...
    DISKPART> active
    ...
    DISKPART> exit
  • Executed these commands before restarting:

    bootrec /fixmbr
    bootrec /fixboot
    bootrec /rescanos
    bcdboot c:\windows
    

    I'm not sure they are all necessary but running them doesn't hurt.

  • Booted from the SSD and everything worked. I plugged the hard drive back in.


Though @Brian answer should work, i used this one and it is much faster and dont require WAIK or WinPE:

  1. Create the partitions

    • On the new drive create a 100MB partition on the beginning of the drive, mark it as active
    • Create another primary partition at least as big as the original C:
    • Mount both partitions, for instance the small one as Y: and the big one as X:
  2. Copy the partitons

    We have to copy everything, even the MBR.

    • Get a partition copy utility that works in windows 7. I used Acronis Disk Director, but i believe Norton Ghost, Acronis True Image or even Seagate Discwizard should do it.
    • Copy your C: partition to the new drive X:
    • This should require a reboot
  3. Change drive letter

    You have to edit the new drive regedit so the assigned drive letter is not X:, but C:

    • Open REGEDIT
    • Select HKEY_LOCAL_MACHINE
    • Go to File -> Load Hive
    • Open X:\[Your windows dir]\System32\Config\SYSTEM
    • Choose a Key name, like "TEMP"
    • It will create a Temp folder, open it and locate MountedDevices
    • Scroll Down and rename \DosDevices\C: to \DosDevices\Z: (or an unused letter)
    • Finally rename \DosDevices\X: to \DosDevices\C:

    Be sure to rename the entry on your new drive's registry, not on the old one

  4. Create BCD

    This should do the bcdboot.exe role

    • Get EasyBCD
    • Go to BCD Deployment, chose the new drive's 100MB partition Y:
    • Install BCD
    • Accept the dialog, to open the brand new BCD
    • Go to Add new entry, select Windows, Type: Windows Vista/7, drive C: and click Add Entry.
  5. Change boot device

    • Reboot and get in your BIOS config (F1 or DEL)
    • Change HD priority, moving the new HD up

That's all