After few attempts I have finally managed to clone the Windows-7 disk properly.
My use case was to clone bitlocked Windows 7 system drive onto a smaller one (SSD) using the original drive to perform the process.
I believe it would be safer and simpler to make the copy with another PC.
With bitlocker: unlock the drive if you can
I did not have this luxury and needed to use recovery key a lot.
Shrinking the system volume (just to fit onto the smaller destination drive)
I was able to shrink the system partition (using Disk Management console) only after running defrag tool called Raxco PerfectDisk 12.5(evaluation version).
This was needed because there were some system files at the end of the volume, which limited shrink-ability.
Note: I needed to schedule Raxco PerfectDisk at boot. Good thing about the tool was that it did not upset bitlocker (did not trigger recovery key procedure).
Hint: try shrinking the drive as much as reasonable (
occupied space + few gbs) as it will limit copying while expanding is free and can be done at runtime in the Disk management console.
Cleaning destination drive
In an elevated cmd window type:
detail disk step make sure that this is the disk you want to clean entirely.
When I skipped this step, I got a drive with no keyboard working (including on-screen one). Thus leaving me with no option to log-in.
Some explanation (as I see it).
When you first connect/initialize a drive to the Win7 system the drive letter is assigned and several GUIDs created (see
HKEY_LOCAL_MACHINE/SYSTEM/MountedDevices registry key).
When you copy the drive, the old assignment (e.g. letter
D) is in effect, and in fact there is no drive at letter
C when you boot. Somehow system boots to log-in screen but many drivers are not loaded (e.g. keyboard ones).
On the other hand When you clean the disk with
parted, the registry is cleaned as well (the references to destination drive) not only the drive. So next time the system boots with this drive, it is free to chose the drive letter
C: (in absence of the original drive).
Cloning the disk
I used EaseUS Partition Manager 9.1, and its Clone Disk Wizard.
Bitlocked partition for the tool is opaque (EaseUS cannot resize it on the fly).
On the other hand BDE partition (bitlocker boot partition) is resizeable and the tool tries to resize it to fill all the empty space on dest drive. Make sure you will adjust the size to about the original one and you will put the partition at the very end of the drive to allow the system partition to be expanded later.
The tool upsets bitlocker, so from now on I needed to use recovery password every time at a boot (of original and destination drive).
Before booting the new drive, remove the source one.
Otherwise the source one will be mounted on
C: and the destination one will be assigned another drive letter... (back to square one).
I do though need to use Bitlocker recover procedure at every boot.