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?
Have you tried
– DavidPostill – 2015-08-23T11:00:19.417sfc
? Use the System File Checker tool to repair missing or corrupted system filesThanks 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. – TallFurryMan – 2015-08-23T20:18:11.277One more thing that can be tried is
dism /online /cleanup-image /scanhealth
. This will locate and replace corrupted Windows modules, independent from the system. – TallFurryMan – 2015-09-06T11:52:40.223