• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How to: Clone a large disk onto a smaller SSD

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

JCLW

Member
Joined
Apr 1, 2002
I just ran into this situation, so I thought I'd share my solution with everyone.

As SSD prices creep lower, more people are buying them to replace HDDs for storing their OS(es) and apps. But SSD prices are still high enough that most people will not be buying an SSD that is a greater capacity then the HDD it is replacing.

In an ideal world you would just start with a fresh Windows install and not worry about this, but that is not always practical for everyone (in my case I'd be risking my marriage as this is my wife's laptop).

Note that everyone's situation will be a little different, depending on how many partitions and how full the drive is.

All the software I link to is free (at least for home use).

In my case I wanted to replace the 320GB drive on a laptop with a 120GB SSD. This laptop has no optical drive, and only one 2.5" bay.


1) Make room.
--------

The first thing to do is to move any and all data off the drive that you're not going to have on the SSD. Often people use a small SSD for OS/apps and a large HDD for images/movies/etc). Now is the time to move all that stuff, if you havn't already. Obviously you can't cram 150GB of data onto a 120GB SSD, no matter how hard you try.


2) Get an external drive.
--------

The first step was to acquire a USB (or eSATA) drive large enough to hold the contents of the drive, at least twice. Note that this isn't >twice the total capacity of the drive, but >twice the capacity of the used space. If you are working with a desktop, or any other system where you can do a direct drive -> drive clone then you only need an external drive that holds the contents of the drive, once. In my case the laptop was using ~40GB, so I needed a ~80GB+ drive. I used my trusty 500GB external USB drive.

You could also use another internal (SATA/PATA) drive as well. If you do then just think of it as "the external drive" when reading this guide.

If you like living on the dangerous side and are working with a system where you can conect both your SSD and HDD at the same time you can do it without an external drive, but I wouldn't recommend it.


3) Download CloneZilla.
--------

Next I downloaded CloneZilla (http://clonezilla.org/). The Live (CD/USB/PXE) version. Burn the ISO onto a CD using your favourite burning software (or http://www.imgburn.com/). Or if you are like me and don't have a optical drive, download TuxBoot (http://tuxboot.org/) to easily create a CloneZilla USB boot stick.


4) Backup your drive.
--------

Boot off your CD/USB CloneZilla device. Just select the default CloneZilla settings. It will load Linux. Pick your language if asked. If it asks don't touch keymap. Start CloneZilla.

To backup the drive we want to select the "Device-Image" option:
- Next select "Local Device".
- If you havn't already connected your external drive connect it now and hit "Enter".
- Pick the drive you want to store the image on (your external drive).
- Pick the root directory.
- Pick Beginner Mode.
- Pick "Save Disk".
- Input a name for the image (I use the default).
- Pick the source drive (your original drive).

It will ask you to confirm a few times. Make sure everything is correct and let it do its thing.

I averaged ~1GB/min so plan your time accordingly.

When it is finished reboot into Windows.


5) Shrink your existing drive to fit on the SSD.
--------

Run Windows disk cleanup and get rid of as much stuff as possible.

Next, use Windows defragmenter to defragment your original drive.

Now we want to to move all the data in the partition to the front, so the partition can be shrunk. Download and install MyDefrag (http://www.mydefrag.com/). Run it, select "Consolidate Free Space" and select drive "C:". Let it do its thing. You can uninstall MyDefrag when it finishes.

If you have more then one partition you want to copy to the SSD defragment and consolidate each partition. Don't worry about system or recovery partitions.

In my case it was just "C:".

Now use Windows disk management (Run -> "compmgmt.msc") and/or EASUS Partition Master (http://www.partition-tool.com/personal.htm) (OverClockers review here: http://www.overclockers.com/easeus-partition-master/) to shrink your wanted partitions, delete the unwanted ones, and more them all to the front of the disk if needed.

I was able to do it all in Win7 disk management but your mileage will vary depeding on the version of Windows you have as well as how much stuff has to be changed.

My 320GB drive had ~1GB system partition, then a ~300GB Windows partition, and finally a ~19GB recovery partition. I deleted the recovery partition, and then shrunk the Windows partition to ~80GB. This left me with a 1GB system partition, an 80GB Windows partition, and ~239GB of unallocated space at the end of the drive.

Again, you want all your unallocated space at the end of the drive.

Depending on what you have to do and the software you use you may have to reboot at least once.

If something goes wrong boot into CloneZilla and restore the backup image you made in step 3 onto your original drive and try again, moving/shrinking in a different order and rebooting/disk checking in between each step.

When you're done moving everything around run disk checks on all the partitions (you'll probably have to reboot to do this).

After the disk checks finish defragment all the drives, again.


6) Clone your HDD onto the SSD.
--------

Now reboot into CloneZilla.

If you have both your original HDD and your SSD plugged in you can do a direct "Device-Device" copy. In my case I can't, so I have to use "Device-Image" mode.

It's basically the same as step 3, except we are saving an image of your repartioned/shrunk drive:
- Select "Local Device".
- If you havn't already connected your external drive connect it now and hit "Enter".
- Pick the drive you want to store the image on (your external drive).
- Pick the root directory.
- Pick Beginner Mode.
- Pick "Save Disk".
- Input a name for the image (*** Make sure it's different then the one in step 3, and easy to remember - ie: "shrunk-img" ***).
- Pick the source drive (your original drive).

Again, it will ask you to confirm a few times. Make sure everything is correct and let it do its thing.

When it finishes power-off the computer, remove the HDD, and install the SSD.

Boot into CloneZilla again.
- Select "Local Device".
- If you havn't already connected your external drive connect it now and hit "Enter".
- Pick the drive you want to resotre the image from (your external drive).
- Pick the root directory.
- Pick Beginner Mode.
- Pick "Restore Disk".
- Pick the shrunk image name (ie: "shrunk-img").
- Pick the target drive (your SSD).

Again, it will ask you to confirm a few times. Make sure everything is correct and let it do its thing.

For me this part was faster: ~2.5GB/min.

When it finishes restart the computer and boot off the SSD into Windows. :)


7) Expand your system partition to fill the SSD.
--------

Finally, use Windows disk management and/or EASUS Partition Master to exapand your system partition to fill the rest of the room on the SSD. Or make another partition. Or whatever you want.


8) Enjoy your SSD :D
--------

You should use your SSD in AHCI mode, if possible. If you're currently in IDE mode run the Microsoft AHCI Fix-it (http://support.microsoft.com/kb/922976) and then change your BIOS SATA setting from IDE to AHCI.

Don't forget to turn off scheduled defrags. If the SSD is the only drive in the system start the services management app (Run -> "services.msc"), find "Disk Defragmenter", [Alt-Click] -> "Properties", set "Startup type" to disabled. I also turn off Readyboost, Superfetch, and Windows Search (indexing service).

Thanks to all the great people who make all the great freeware.
 
Wow... thanks for the write up!!! Reminds me of why Im always prepared to start fresh...and yes Im married.

Also, I dont think you have to worry about disabling defrag on the drive. W7 should know that already unless b/c of this move it still thinks its mechanical?
 
Excellent guide JCLW! This should be written into an article, as it's very nicely formatted.

For those who have Ghost v11 or newer, you can use a bootable BartPE USB/CD and clone directly from drive to drive w/o shrinking and expanding, once you've performed JCLW's step #1.

But for a free, open-source centric solution, the guide above is spot on.

Thanks bud! :thup:

Edit: Dang you EarthDog, always beating me to the punch!!! :p
 
Also, I dont think you have to worry about disabling defrag on the drive. W7 should know that already unless b/c of this move it still thinks its mechanical?
Maybe. I'm not sure. When I checked it still had defrag scheduled. I didn't wait to see if it would actually run.

Does this align the SSD properly?
In my experience (three clones so far): If your partitions were aligned before, they will be aligned after. As long as you don't play with the size of the system partition at the front of the drive.
 
The system partition up front is for bitlocker and the restore partition. I dont believe it has a role in alignemnt. I Vlite'd that option out of my W7 install and mine still aligns properly. ;)

Note: Run AS SSD and see if its aligned... ;)
 
According to the OCZ SSD guide, one should just run WEI to configure most of the defrag, superfetch, etc stuff automatically. I'm not sure if it works when cloning from a mechanical HDD, though.

OCZ ABC SSD GUIDE said:
64-66.
Windows Accelerators and De-Fragmentation

(Prefetch, BootTrace, Superfetch, ReadyBoot, ReadyBoost and ReadyDrive)


64.
De-Fragmentation
Fragmentation varies across File Systems (FS) and Operating Systems (OS).
Linux and Apple Mac OSX handle fragmentation well.
Windows not so well.
With your SSD, De-Fragmentation is less of an issue than with HDD.
Across all FS/OS, the less data stored.. the less fragmentation occurs.
Across all FS/OS, best not to fully de-fragment Volumes on SSD.
Consolidating Volume Free Space can benefit Logical to Physical Mapping.
See Section C paras 50-52 above.

Win 7 De-Fragmentation
On install and after WEI, Win 7 will disable defrag on your OCZ SSD.
See Screen shots 7 and 8
To check.. click on Start and type "defrag" in the search box >
Select "De-fragment your Hard Drive" or "Disk De-fragmenter" icon >
Select your OCZ SSD, then Configure Schedule like this:


Screenshot 7






Then.. in the Modify Schedule window "Select Disks".. no SSD shows:

Screen shot 8






65.
Windows Accelerators -
Prefetch, BootTrace, Superfetch, ReadyBoot, ReadyBoost and ReadyDrive

Collectively in Windows, the above are called PC Accelerators.
Only Prefetch is present in XP.
Their purpose is to pre-load regularly used services/calls into memory (cache).
They allow faster 'prefetched' reading and depend on memory available.
This is mostly redundant with modern SSD, due to their fast read abilities.
Win 7 manages prefetched data intuitively, based on your usage pattern.
Vista does not prefetch data as intuitively as Win 7.
Vista may need manual setting/disable.
Best to let Win 7 manage Windows Accelerators.. do not disable manually.
Don't disable them in Win 7 before running Windows Experience Index (WEI).
Let Win 7 manage them.. by traces during Boot, Idle time and over time.

Prefetch and BootTrace
Prefetch parses both BootTrace data and APPLICATION data.
Depends on your Apps installed and amount of tinkering/reboots you do.
It continues to log/trace to the Windows>Prefetch folder.
Prefetch uses the Task Scheduler process.

Superfetch, ReadyBoot, ReadyBoost and ReadyDrive
All the above Windows Accelerators are present in Win 7/Vista.
Superfetch controls ReadyBoot, ReadyBoost and ReadyDrive.
Superfetch's Service Host is sysmain.dll or known as the Superfetch Service.
Sysmain.dll is in the Windows>System32 folder.

In Win 7/Vista.. run WEI after installing Chipset/VGA drivers, then leave for a week.
After.. if you need to confirm, you can check the following Registry entries:

Code:

HKLM/System/CurrentControlset/Control/Session Manager/Memory Management/Prefetch Parameters

Key values of EnableBootTrace should return “0”
EnablePrefetcher, EnableSuperfetch should all return "3"

Code:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\WMI\Autologger\ReadyBoot

The key Start value for ReadyBoot should return “0”

66.
ReadyBoost is Vista/Win 7 only Non Volatile (NV) cache:
Such as as ReadyBoost enabled USB flash and Intel's Robson/Turbo Memory.
Leave it alone as Windows is intuitive enough to figure out NV Cache for itself.
Default Policy setting for Vista and Win 7 is NOT CONFIGURED.
This means that the default is NV Cache ON.. but only if needed. To check:

Run> gpedit.msc> Computer Configuration>
Administrative Templates> System> Disk NV Cache>.. you will see:

Turn Off Boot and Resume Optimizations
Turn Off Cache Power Mode
Turn Off Non Volatile Cache Feature*
Turn Off Solid State Mode

*All other sub Policies are dependant on the Turn Off Non Volatile Cache Feature.

An extensive description of Windows Accelerators is here:
http://www.microsoft.com/whdc/system...perfaccel.mspx



http://www.ocztechnologyforum.com/f...BC-for-OCZ-SSD&p=567579&viewfull=1#post567579
 
Maybe. I'm not sure. When I checked it still had defrag scheduled. I didn't wait to see if it would actually run.

In my experience (three clones so far): If your partitions were aligned before, they will be aligned after. As long as you don't play with the size of the system partition at the front of the drive.

Yeah, but if it was a mechanical HDD w/o 4k then it would have been aligned to sector63. It it retains that it will still be aligned to sector 63 which isn't optimal for SSDs.
 
There you go, I didn't really know what that partition was for. A clean Win7 install seems to place it at ~100MB. My wife's Lenovo laptop came with a 1GB system partition.

Two were aligned before cloning, and are still aligned. The third was not aligned pre-cloning, and was not aligned post-cloning.

I didn't actually try changing the size of the system partitions - I just assumed (possibly incorrectly) that changing them would result in mis-alignment.
 
So it shows in AS SSD its aligned? Screenshots? I am curious about this issue as Im not sure how W7 aligns a mechanical drive (which the image came from) vs an SSD...

EDIT: Jason catches my drift... ;)
 
On the computer with the ~100MB system partition AS SSD reports "103424 K - OK"

On the computer with the ~1GB system partition AS SSD reports "1229824 K -OK"

Note that:

103424 K / 1024 = 101MB which is the size of the system partition.

1229824 K / 1024 = 1201MB / 1024 = 1.17GB which is the size of the system partition.

I'll post a screenshot in a minute - have to get my daughter a snack.
 
Looks aligned to me!!! The size of that partition would always match the alignment...when aligned properly. Without it, Im still aligned.
 
TBH I have no idea on the alignment piece. Had to do a bit of Googling to familiarize myself with the concept as it pertains to SSDs. I would make an educated guess that Ghost does not (depending on version?) modify the alignment. When working with Ghost, it has always restored the partitions exactly as they were, except for the total disk size difference. Everything else was the same, sector by sector.
 
Found a better way to check alignment/offset. Both AS SSD and DiskPart round it to the nearest 1K (interestingly, AS SSD rounds down and DiskPart rounds up).

From a command prompt:
Code:
wmic partition get startingoffset, name
 
Last edited:
Back