Header Shadow Image


Cloning NTFS 1TB disk to 240GB SSD

The key to this is that the enterity of the data HAS to fig into the new space.  If it doesn't, you'll either need to get a bigger disk or start deleting stuff off the old disk.  In my case the data was 120GB so it can easily fit in a 240GB SSD.  Now, if you just want a quick solution, skip to step 21.  But if you want the longer Linux attempt, read steps through first, then follow them from top to bottom.  However in my case, I could not get the Linux solution to work.  However, others have.  NOTE: I don't make any guarantees here.  Ensure you make a backup copy of your drive first.  Never work directly with the individual if given a choice.


1) Create smaller partitions including the Recovery and System Reserved and main partition USING Windows.  Try to mimic the partition definition of your existing disk, except make the primary partitions that hold all the data smaller.  I found the Linux commands don't really create the boot records appropriately and your system won't boot if you try to use Linux to creating these.  YMMV however.  Tools like ntfs-3g help but still fall short.

2) Once you have the partitions defined, add the disk to a Linux system and rsync the various folder of the old disks to the new disk.  To make this safer and less prone to potential errors, I used ntfs-3g to clone the old disk partitions then mount the old partitions on my linux image via the loopback device ( mount -o loop ….. )  In case of issues, I only corrupt the image I've taken, NOT the original drive.

3) Mount the images on Linux.

4) Rsync everything over.  In this case I used something like this for all 3 windows partitions:

36828  rsync -rltDvu –modify-window=1 –progress –delete /mnt/sdm1/ /mnt/sdg1/
36831  rsync -rltDvu –modify-window=1 –progress –delete /mnt/sdm2/ /mnt/sdg2/
36834  rsync -rltDvu –modify-window=1 –progress –delete /mnt/sdm3/ /mnt/sdg3/

5) Wait.

6) Wait some more.

7) Or just let the thing run overnight.

8) Make the original primary partition active.  You can check your windows original disk to see what that was or fdisk -l will tell you. 

9) Try to boot up.

10) You might get this error:

Recovery

Your PC/Device needs to be repaired
The application or operating system couldn't be loaded because a required file is missing or contains errors.
File:\\WINDOWS\system32\winload.exe
Error code: 0xc000000e

You'll need to use recovery tools.  If you don't have any installation medis (like a disc or USB device), contact your PC administrator or PC/Device manufacturer.

11) Remount the disk on Linux and check the C:\WINDOWS\ folder.  It might be empty. 

12) You may get this error:

[root@mbpc-pc mnt]# mount /dev/sdg2 /mnt/sdg2
Windows is hibernated, refused to mount.
Failed to mount '/dev/sdg2': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
[root@mbpc-pc mnt]#

13) You may be told this will fix it:

[root@mbpc-pc mnt]# ntfsfix /dev/sdg2
Mounting volume… Windows is hibernated, refused to mount.
FAILED
Attempting to correct errors…
Processing $MFT and $MFTMirr…
Reading $MFT… OK
Reading $MFTMirr… OK
Comparing $MFTMirr to $MFT… OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition… OK
Going to empty the journal ($LogFile)… OK
Windows is hibernated, refused to mount.
Remount failed: Operation not permitted
[root@mbpc-pc mnt]#

14) But in reality this is what you might need (CAREFUL: This removed the hibernate file so you might loose saved data.)

remove_hiberfile
              When  the  NTFS volume is hibernated, a read-write mount is denied and a read-only mount is forced.
              One needs either to resume Windows and shutdown it properly, or use this option which  will  remove
              the  Windows  hibernation file. Please note, this means that the saved Windows session will be com-
              pletely lost. Use this option under your own responsibility.

15) You're going to try it.

[root@mbpc-pc mnt]# ntfs-3g -o remove_hiberfile /dev/sdg2 /mnt/sdg2
[root@mbpc-pc mnt]#

16) Happy Moment!

[root@mbpc-pc sdg2]# mount|grep -Ei sdg2
/dev/sdg2 on /mnt/sdg2 type fuseblk (rw,allow_other,blksize=4096)
[root@mbpc-pc sdg2]#

17) Run the rsync again.  This time pipe the output to a log file to analyze.

rsync -rltDvu –modify-window=1 –progress –delete /mnt/sdm2/ /mnt/sdg2/ 2>&1 | tee -a./what-the-hell.log

18) Analyze the log or check what was missed.

19) But alas it was not meant to be.  However I try to add the 3 plugins on the ntfs-3g page, they fail to detect on this Scientific Linux 6.7 with Kernel 4.8.4. More on the issue of unsupported reparse point issue.

20) Fcuk!

21) Ok, we're waisting time now.  Obviously the Linux route isn't yet fully mature being rough around the edges.  Great project, but not quite there yet.  Searching, I came across the AOEMI Backupper.  ( And believe me, it functions better then the name would suggest )

22) Following the instructions, the free version did EVERYTHING cloning the 1TB disk over to the 240GB SSD.  And yes, it even shrunk the partitions to scale.  The only thing you had to do is make sure the data on the disk would fit on a 240GB SSD.  Otherwise the bets are off.

Cheers,
TK

Leave a Reply

 


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License