1

I am trying to update a Windows 7 installation to Windows 10, but the procedure is failing repeatedly at step MIGRATE_DATA.

Investigating what could prevent the migration, I found two corrupted files on the boot drive (a 100GB SSD in NTFS format). The corrupted files are invisible under the explorer, but were located while looking for large directories using du under Cygwin:

du: cannot read directory './Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETPortable/v4.0/S\177ste\344.Ne\247.xml': File exists
du: cannot read directory './Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETPortable/v4.6/Profile/Profile84/S9stem.Nef.Requests.xml': File exists

Both files behave the same in my attempts. The first file is listed by ls -l like this:

$ ls -l /cygdrive/c/Program\ Files\ \(x86\)/Reference\ Assemblies/Microsoft/Framework/.NETPortable/v4.0
total 6892
(...)
-rwxrwx---+ 1 SYSTEM       SYSTEM         362197 Mar 12  2014 System.xml
drwxr-x---  1 Unknown+User Unknown+Group       0 Dec  3  2018 S?ste?.Ne?.xml
-rwxrwx---+ 1 SYSTEM       SYSTEM         235088 Mar 14  2014 mscorlib.dll(...)

While the completion wouldn't work with its name, typing it with unicode characters in a rm command has no effect, and prepending strace on the command says:

   46  108762 [main] rm 8608 path_conv::check: this->path(C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\S177ste344.Ne247.xml), has_acls(1)
   42  108804 [main] rm 8608 unlink: unlinking a nonexistent file
   45  108849 [main] rm 8608 __set_errno: int unlink(const char*):1054 setting errno 2
   42  108891 [main] rm 8608 unlink: -1 = unlink(/cygdrive/c/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETPortable/v4.0/S177ste344.Ne247.xml), errno 2

I say "file" because from their names and locations, these elements were actually files and not directories as their ACL indicate (System.Net.xml and System.Net.Requests.xml). There was obviously a corruption at some point.

Just for the fun of it, this is what an elevated cmd says about the file (in french but you get the idea, weird date and count, plus it happens to be hidden):

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0>dir /ah
 Le volume dans le lecteur C s’appelle BootSSD
 Le numéro de série du volume est 0EA2-18D0

 Répertoire de C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0

13/05/30600  04:58              Ssteõ.Neº.xml
               0 fichier(s)                0 octets
               1 Rép(s)  30 887 821 312 octets libres

The problem with this corruption is that it is stable: using chkdsk /f c: has no effect on those files.

I have not checked if it there was a previous version of these files, but I suspect I wouldn't be able to replace them, and even if I could, those files wouldn't be deleted in the process.

My best chance seems to find a way to revert the file record to an actual file instead of a directory, but I have no idea how to do that.

Any ideas?

3
  • Thanks for this tip. Yes I tried sfc /scannow as part of my previous investigations. While noticeably, it indicated some elements could not be restored properly in the past, it now finds no integrity violation. So this was certainly a good idea to run just now. But it doesn't touch the corrupted files. Aug 23, 2015 at 20:18
  • One more thing that can be tried is dism /online /cleanup-image /scanhealth. This will locate and replace corrupted Windows modules, independent from the system. Sep 6, 2015 at 11:52

1 Answer 1

1

A transitory answer to my own question. I used a live USB key with RescueCD, and mounted the partition using ntfs-3g:

% ntfs-3g /dev/sda1 /mnt/windows
% rm /mnt/windows/Program\ Files\ \(x86\)/Reference\ Assemblies/Microsoft/Framework/.NETPortable/v4.0/S$'\177'steõ.Neº.xml

The two files were listed as this, and were removed without apparent issue, task which was impossible under Windows:

-rwxrwxrwx 2 root root    0 Dec  3  2018 S?steõ.Neº.xml
-rwxrwxrwx 2 root root  161 Jul  2  1983 S9stem.Nef.Requests.xml

Then I used a very basic find /mnt/windows -iregex '.*[^a-zA-Z0-9_.() {}#]+', which allowed me to find another weird file, located in a slightly more sensitive area, but of null size (usual name is commctl32.dll, Common Controls library):

-rwxrwxrwx 1 root root 0 Sep  6  2021 ./windows/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af/cñmcte32.dll

I'm posting this as a progress in my attempt to clean the filesystem up. I had never used ntfs-3g before, and this is quite pleasing. Whether it is stable, time will tell :)

Update: there was one last "corrupted" file in c:\windows\ehome. This directory is a remnant from Media Center, which is uninstalled by the upgrade to Windows 10. This was the last element which prevented the Windows 10 upgrade from succeeding at FIRST_PASS/MIGRATE_DATA. As I realized afterwards, this is a quite simple failure while backing directory Windows up to Windows.old. I've seen clearer error codes...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .