Thursday, September 17, 2015

file permissions - How to clone Windows on filelevel


I've an old laptop (WinXP) which I wanted to clone via Linux's dd (Ubuntu live CD) onto a second HDD. Unfortunately dd fails due to read I/O errors. The Windows Installation itself is still able to read all files from its drive, so I think NTFS marked some sectors as unusable. That's why I want to clone the installation on a file level. At first I dd'ed the MBR to the second HDD, so the partition layout is the same on source and destination HDD. The next step was to clone the actual files. I connected the two HDD's to a thirdparty Windows machine (Windows 7) and used robocopy to clone the files including the permissions:


ROBOCOPY E:\ F:\ /e /efsraw /copyall /dcopy:t /r:0


So even as I ran the commandline for robocopy "as Administrator", some directories gave me "Access denied", e.g. the users %appdata%. Is there a way to ship around this problem? I don't want to mess with the permissions on the source volume, so how can I copy the user profiles correctly?


Current state is, that the file-cloned Windows installation boots, but the user profiles are missing data.


Answer



You should stick to the block-level copy, but use a fault-tolerant tool like ddrescue - this will just write zeroes for unreadable block and move on.


I have quite successfully rescued a lot of Windows installations from failing HDDs with this method.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...