Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

Preserving NTFS special reparse points when copying entire Windows installation to another partition


Recommended Posts

Was looking into how to migrate Windows to another partition and figured Ln by Hermann Schinagl might be the best for the job. I invoked it as shown in the example on how to copy full drive (Copying a full drive).

Other than that I should probably use another combination of command line parameters to have directory junctions and such still point to C:\ (they pointed to the letter the target partition was mounted at in WinPE) as the booted OS will see its partition as C:\ and I don't have any junction pointing to any other partition, I noticed some things failed to copy.

There's some odd files connected to UWP apps located in %LOCALAPPDATA%\Microsoft\WindowsApps that appear to be some kind of reparse points.

Invoking fsutil reparsepoint query C:\Users\User\AppData\Local\Microsoft\WindowsApps\MicrosoftEdge.exe for instance prints that this is reparse point with a tag value 0x8000001b and some other data.

Ln printed an error when encountering such reparse points, like:

!+r(0x00001129) <path to problematic file>

The file was skipped.

Robocopy makes an empty file (confirmed by fsutil reparsepoint query command) in target directory when you point it at source directory with such reparse points and add /SL and /SJ parameters. I haven't found any other utility that wouldn't choke on those.

Is it actually impossible to copy those over without knowing some low-level NTFS hackery?

Edited by UCyborg
Formatting
Link to post
Share on other sites

Try NTFS Permissions Tools? https://m.majorgeeks.com/files/details/ntfs_permissions_tools.html
 

Oh of course! It's not a permissions issue but related to reparse points not being preserved. Sorry I must've been high or drunk (it was late at night) :D 

Edited by xpclient
Link to post
Share on other sites

Questions (not answers :():

1) is the NTFS filesystem "sound" (i.e. does it pass a CHKDSK run without evidencing any issue)?
2) does this happens under Windows 10 (or a Windows 10 based PE) only or is it the same under - say - Windows 7 (or a windows 7 based PE)?

To understand if it is a filesystem connected issue or an OS connected one, the "reparse point with a tag value 0x8000001b" is definitely connected to UWP:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4

it is entirely possible that the good MS guys have updated some parts of the NTFS but not some of the tools (robocopy) and that the (otherwise exceptionally good) third party tools such as Ln and Fastcopy have not (yet) been updated to take care of the changes. :unsure:

jaclaz

 

P.S.: Do check these:

https://www.tiraniddo.dev/2019/09/overview-of-windows-execution-aliases.html

https://stackoverflow.com/questions/60421250/windows-10-user-unable-to-execute-appexeclink-reparse-point-exe-files

Edited by jaclaz
Link to post
Share on other sites
Posted (edited)
2 hours ago, jaclaz said:

1) is the NTFS filesystem "sound" (i.e. does it pass a CHKDSK run without evidencing any issue)?

Aye, its health is at 100%.

2 hours ago, jaclaz said:

2) does this happens under Windows 10 (or a Windows 10 based PE) only or is it the same under - say - Windows 7 (or a windows 7 based PE)?

Yes, but I only tried Windows 10 and its PE environment. I imagine it would be the same with Windows 7. I once tried deleting all Windows 10's folders from its root partition with good old rd /S /Q command using Windows 8.1 PE, it was unable to delete such reparse points, but it was possible with Windows 10 PE.

2 hours ago, jaclaz said:

it is entirely possible that the good MS guys have updated some parts of the NTFS but not some of the tools (robocopy) and that the (otherwise exceptionally good) third party tools such as Ln and Fastcopy have not (yet) been updated to take care of the changes. :unsure:

Definitely seems to be the case here.

2 hours ago, jaclaz said:

Interesting, it seems Set-ExecutionAlias could be used to replicate them on another partition. But why there isn't a generic way to replicate arbitrary reparse point on another NTFS file system since you don't really care about the content.

Edited by UCyborg
Formatting
Link to post
Share on other sites

I don't know it is possible (but just a guess) that an older OS treats the attribute/whatever of those particular reparse points in a different manner, either ignoring them or copying them just fine because it knows nothing of the 0x00000001b tag. :unsure:

It may depend on the actual mechanisms that the specific copy program uses.

jaclaz

Link to post
Share on other sites

I'm not involving older OS in this case. At the first glance, deleting reparse points is not a problem as long as you get the updated OS to do it, which is better familiar with its specific reparse points, though copying them to another file system is still another story.

Using Ln for the first time, I didn't turn on logging back then, so I didn't get the entire picture of what else failed to copy, besides 8 reparse points, the summary noted 5 folders as well.

I'm going to take alternative route to do what I'm trying to do - merge data of 2 partitions onto a single partition - so instead of copying Windows to another partition, I'll copy other stuff to Windows partition.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...