bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to clone to a smaller HDD without messing up partitions?


From: Shahrukh Merchant
Subject: How to clone to a smaller HDD without messing up partitions?
Date: Fri, 25 Oct 2019 23:03:33 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

I have a 500 GB HDD (source) that I want to clone to a 320 GB HDD (destination). Both are MBR. Only about 60 GB of the source drive is actually in use (in 2 partitions), the rest (400+ GB) is in unallocated space.

I will ask more specifically in two different ways:

1. I would like to tell ddrescue to clone the entire drive, i.e.,

ddrescue -f -n /dev/sda /dev/sdb

BUT with options that effectively say "and don't worry if you run out of space on the destination drive--just stop copying since the important stuff is at the start anyway." Can I do that, and how? (And other than relying on the Windows Disk Management visual to believe that the unallocated space is all at the end, which it seems to be, is there some other tool I can use to let me confirm that explicitly?)

2. If the answer to the above is "No" or "Not recommended," then I would have to do the clone partition by partition. There are two partitions on the source disk as follows:

lsblk version
-------------
sda             465.8G
 -sda1 RECOVERY   9.8G ntfs
 -sda1 OS        54.9G ntfs

Windows 7 Disk Management version
---------------------------------
Disk0 Basic/465.76 GB/Online
--------
9.77 GB
Healthy (Active, Recovery Partition)
--------
OS (C:)
54.93 GB (NTFS)
Healthy (Boot, Page File, Crash Dump, Primary Partition)
--------
401.07 GB
Unallocated
--------

So if I do the clone partition by partition, two things are not clear:

(a) What is the sequence of commands I need to use (and how to I prepare the destination drive in advance). Can I do, for example:
    ddrescue -f -n /dev/sda1 /dev/sdb
    ddrescue -f -n /dev/sda2 /dev/sdb
and have ddrescue figure out that I mean "put them in their corresponding places on the destination drive based on how it was on the source drive and fix the MFT so it does the right thing" (seems a lot to ask for, but maybe it does!)?

(b) How do I maintain the integrity of the destination drive w.r.t. the MFT of that drive being properly configured (since it is not part of the ddrescue copy, as I understand it, if I do a partition at a time), and in terms of the destination drive booting fine in exactly the same way?

Basically, the unallocated space at the end is the only part that I want to be different, owing to the different in drive sizes.

Thanks!

Shahrukh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]