ntfsclone Windows partition to smaller partition on another disk

First of all you will need some kind of bootable Linux distribution. I have used Kali linux. Please execute following commands as root.

First check which partition do you use for your Windows installation. Since I was using Windows 7, first partition was 100MB reserved space and second partition was my Windows installation.

Disk I previously used was 120GB fully formatted as one single partition, and I want to move my installation to 68GB partition on my new 500GB drive.

First step is to resize existing windows partition (sda in my case is source disk 120GB, sdb is my destination disk 500GB).

I have chosen to resize to 62GB and later to expand to fit to my 68GB partition on my new 500GB hard disk. Of course you will need to use appropriate size for your resizing. On my system it looked something like this:

root@debian:~# ntfsresize --size 62G /dev/sda2
 ntfsresize v2012.1.15AR.5 (libntfs-3g)
 Device name        : /dev/sda2
 NTFS volume version: 3.1
 Cluster size       : 4096 bytes
 Current volume size: 119926682112 bytes (119927 MB)
 Current device size: 119926685696 bytes (119927 MB)
 New volume size    : 61999993344 bytes (62000 MB)
 Checking filesystem consistency ...
 100.00 percent completed
 Accounting clusters ...
 Space in use       : 52415 MB (43.7%)
 Collecting resizing constraints ...
 Needed relocations : 4602441 (18852 MB)
 WARNING: Every sanity check passed and only the dangerous operations left.
 Make sure that important data has been backed up! Power outage or computer
 crash may result major data loss!
 Are you sure you want to proceed (y/[n])? y
 Schedule chkdsk for NTFS consistency check at Windows boot time ...
 Resetting $LogFile ... (this might take a while)
 Relocating needed data ...
 100.00 percent completed
 Updating $BadClust file ...
 Updating $Bitmap file ...
 Updating Boot record ...
 Syncing device ...
 Successfully resized NTFS on device '/dev/sda2'.
 You can go on to shrink the device for example with Linux fdisk.
 IMPORTANT: When recreating the partition, make sure that you
 1)  create it at the same disk sector (use sector as the unit!)
 2)  create it with the same partition type (usually 7, HPFS/NTFS)
 3)  do not make it smaller than the new NTFS filesystem size
 4)  set the bootable flag for the partition if it existed before
 Otherwise you won't be able to access NTFS or can't boot from the disk!
 If you make a mistake and don't have a partition table backup then you
 can recover the partition table by TestDisk or Parted's rescue mode.

This operation takes a while, be patient it should work without issues.

Now it’s time to clone my source partition content /dev/sda2 to my destination partition /dev/sdb2.

root@debian:~# ntfsclone --force --overwrite /dev/sdb2 /dev/sda2
 ntfsclone v2012.1.15AR.5 (libntfs-3g)
 NTFS volume version: 3.1
 Cluster size       : 4096 bytes
 Current volume size: 61999992832 bytes (62000 MB)
 Current device size: 119926685696 bytes (119927 MB)
 Scanning volume ...
 100.00 percent completed
 Accounting clusters ...
 Space in use       : 52413 MB (84.5%)
 Cloning NTFS ...
 100.00 percent completed
 Syncing ...

When this is finished I would like to expand my new partition to it’s full size in this case from 62GB to 68GB. I have used exact size in bytes that I got by running cfdisk:

root@debian:~# cfdisk /dev/sdb

So my new partition size will be 68110342656 bytes.

root@debian:~# ntfsresize -s 68110342656 /dev/sdb2
 ntfsresize v2012.1.15AR.5 (libntfs-3g)
 ERROR: Volume is scheduled for check.
 Run chkdsk /f and please try again, or see option -f.
 root@debian:~# ntfsresize -s 68110342656 /dev/sdb2 -f
 ntfsresize v2012.1.15AR.5 (libntfs-3g)
 Device name        : /dev/sdb2
 NTFS volume version: 3.1
 Cluster size       : 4096 bytes
 Current volume size: 61999993344 bytes (62000 MB)
 Current device size: 68110342656 bytes (68111 MB)
 New volume size    : 68110336512 bytes (68111 MB)
 Checking filesystem consistency ...
 100.00 percent completed
 Accounting clusters ...
 Space in use       : 52413 MB (84.5%)
 Collecting resizing constraints ...
 WARNING: Every sanity check passed and only the dangerous operations left.
 Make sure that important data has been backed up! Power outage or computer
 crash may result major data loss!
 Are you sure you want to proceed (y/[n])? y
 Schedule chkdsk for NTFS consistency check at Windows boot time ...
 Resetting $LogFile ... (this might take a while)
 Updating $BadClust file ...
 Updating $Bitmap file ...
 Updating Boot record ...
 Syncing device ...
 Successfully resized NTFS on device '/dev/sdb2'.

Now you can safely reboot into your Windows, make sure you have replaced the hard disks before booting and be patient if Windows needs to do some check disk operation. It takes a while but at the end it should be OK.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.