Cách sửa các tệp hệ thống bị hỏng từ đĩa cài đặt


14

Tôi đang sử dụng Windows 8.1 x64, bản dựng 6.3.9600.16384, sử dụng Dấu nhắc lệnh với đặc quyền của quản trị viên.

sfc /scannow

trả về:

...found corrupt files but was unable to fix some of them.

dism /online /cleanup-image /restorehealth

trả về:

Error: 0x800f0906
The source files could not be downloaded.

(và Dịch vụ Cập nhật Windows không thể khởi động vì các tệp đó bị thiếu.)

cũng đã thử

dism /online /cleanup-image /restorehealth /source:wim:F:\sources\install.wim:1 /limitaccess

và đã trở lại:

Version: 6.3.9600.16384
Image Version: 6.3.9600.16384
Error: 0x800f081f
The source files could not be found.

Tôi gắn hình ảnh, và thử từ đó.

dism /mount-image /imagefile:F:\sources\install.wim /index:1 /mountdir:C:\offline

dism /online /cleanup-image /restoreHealth /source:c:\offline /limitaccess

cũng trở về:

Error: 0x800f081f

Làm cách nào để sửa chữa các tệp hệ thống bị hỏng?

Tôi có thể bảo DISM sử dụng đĩa cài đặt Windows làm nguồn không?



@ and31415, người đăng câu hỏi đó đã giải quyết vấn đề của anh ta, nhưng câu trả lời đó không giải quyết được vấn đề của tôi.
Carlos Gil

1
Sau đó, bạn có thể sao chép CSB.logtệp (thường có thể tìm thấy C:\Windows\Logs\CBS) vào màn hình nền, nén nó trong kho lưu trữ .zip / .7z và tải nó lên một nơi nào đó (ví dụ: ge.tt/about ). Sau đó gửi liên kết kết quả ở đây để kiểm tra thêm.
và31415

Bạn đi đây Điều này được CSB.logtạo bởi sfc /scannow CSB.log
Carlos Gil

Câu trả lời:


22

Lọc các chi tiết

Chạy sfc /scannowsẽ tạo ra một CBS.logtệp báo cáo (thường được tìm thấy C:\Windows\Logs\CBS) có chứa rất nhiều thông tin. Để có được các bit juicy, hãy mở một dấu nhắc lệnh và thực hiện lệnh này:

findstr /i /c:"[SR]" "%windir%\Logs\CBS\CBS.log" | findstr /i /v /c:"verify" > "%userprofile%\Desktop\sfc.txt"

Lệnh trên sẽ:

  1. Nhận tất cả các dòng trong tệp gốc có chứa [SR]các dòng theo dõi các nỗ lực sửa chữa.

  2. Xóa tất cả các dòng có chứa verifytừ những gì chúng ta có trong bước trước để tiếp tục giảm sự lộn xộn.

  3. Viết kết quả vào sfc.txttệp để phân tích sau.

Trong trường hợp này, đây sẽ là tệp kết quả:

2014-02-19 17:08:47, Info                  CSI    0000008b [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:49, Info                  CSI    0000008c [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:49, Info                  CSI    0000008d [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:08:51, Info                  CSI    00000091 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:53, Info                  CSI    00000092 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:53, Info                  CSI    00000093 [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:08:56, Info                  CSI    00000097 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:57, Info                  CSI    00000098 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:08:57, Info                  CSI    00000099 [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    00000975 [SR] Repairing 3 components
2014-02-19 17:23:00, Info                  CSI    00000977 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000978 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000979 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097a [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097b [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    0000097c [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097d [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    0000097e [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    0000097f [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"
2014-02-19 17:23:00, Info                  CSI    00000980 [SR] Repair complete
2014-02-19 17:23:00, Info                  CSI    00000981 [SR] Committing transaction

Xác định các vấn đề

Kiểm tra tệp bạn có thể thấy Trình kiểm tra tệp hệ thống đã cố sửa chữa 3 thành phần, nhưng không thành công:

2014-02-19 17:23:00, Info                  CSI    00000975 [SR] Repairing 3 components
2014-02-19 17:23:00, Info                  CSI    00000977 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-Main, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000978 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-LockScreenCamera-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
2014-02-19 17:23:00, Info                  CSI    00000979 [SR] Cannot repair member file [l:22{11}]"Generic.xbf" of Microsoft-Windows-Camera-MediaViewerDistributed-MediaShared, Version = 6.3.9600.16485, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing

Mỗi mục theo sơ đồ thô này:

  • Cannot repair member file [...]"Generic.xbf"
    Các tập tin cần phải được sửa chữa.

  • of Microsoft-Windows-Camera-LockScreenCamera-Main,
    Tên của gói mà tập tin thuộc về.

  • Version = 6.3.9600.16485,
    Phiên bản tệp (chính, phụ, xây dựng và sửa đổi).

  • pA = PROCESSOR_ARCHITECTURE_AMD64 (9),
    Kiến trúc bộ xử lý được nhắm mục tiêu .

  • Culture neutral, [...],
    Hoặc trung tính hoặc tên văn hóa liên quan nếu được bản địa hóa.

  • file is missing
    Lý do các tập tin cần phải được sửa chữa.

Có ba Generic.xbftập tin bị thiếu. Ngoài ra, tất cả đều chia sẻ thông tin này:

2014-02-19 17:23:00, Info                  CSI    0000097b [SR] This component was referenced by [l:154{77}]"Package_1_for_KB2914218~31bf3856ad364e35~amd64~~6.3.1.3.2914218-1_neutral_GDR"

Điều này có nghĩa là tệp được bao gồm trong bản cập nhật Windows KB2914218.

Sửa chữa bằng tay

  1. Nhận gói cập nhật KB2914218 .

  2. Trích xuất .msutệp đã tải xuống bằng 7-Zip trong thư mục được đặt tên theo tệp gốc (ví dụ Windows8.1-KB2914218-x64).

  3. Mở một dấu nhắc lệnh với tư cách quản trị viên và điều hướng đến thư mục thực tế bằng cách sử dụng lệnh sau:

    cd /d "X:\Whatever\Windows8.1-KB2914218-x64"
    
  4. Mở rộng kho lưu trữ nội các chứa các tệp cập nhật trong thư mục hiện tại:

    expand Windows8.1-KB2914218-x64.cab -f:* %cd%
    
  5. Mỗi gói có một .manifesttệp liên quan liệt kê các tệp được đóng gói. Để xác định nơi mỗi tệp được lưu trữ, hãy chạy lệnh sau bằng cách thay thế packagaNamefileName.extbằng các giá trị thực tế:

    for /f "delims=" %A in ('"findstr /i /m /c:"packageName" *.manifest"') do @for /f "delims=" %B in ('"findstr /i /m /c:"fileName.ext" %A"') do @echo %~nB;fileName.ext>>fixes.txt
    

    Ví dụ:

    for /f "delims=" %A in ('"findstr /i /m /c:"Microsoft-Windows-Camera-LockScreenCamera-Main" *.manifest"') do @for /f "delims=" %B in ('"findstr /i /m /c:"Generic.xbf" %A"') do @echo %~nB;Generic.xbf>>fixes.txt
    
  6. Lặp lại bước 5 cho bất kỳ tệp nào khác cần được sửa.

  7. Hãy sở hữu và kiểm soát hoàn toàn C:\Windows\winsxsthư mục:

    takeown /f "%windir%\winsxs" /a
    icacls "%windir%\winsxs" /grant:r *S-1-5-32-544:(OI)(CI)(F) /q
    
  8. Tạo bất kỳ thư mục bị thiếu:

    for /f "tokens=1 delims=;" %G in (fixes.txt) do @if not exist "%windir%\winsxs\%~G\" @md "%windir%\winsxs\%~G"
    
  9. Kiểm soát hoàn toàn các thư mục cần thiết:

    for /f "tokens=1 delims=;" %G in (fixes.txt) do takeown /f "%windir%\winsxs\%~G" /a >nul & icacls "%windir%\winsxs\%~G" /grant:r *S-1-5-32-544:(OI)(CI)(F) /q
    
  10. Khôi phục các tệp:

    for /f "tokens=1,2 delims=;" %A in (fixes.txt) do copy /y ".\%A\%B" "%windir%\winsxs\%A\%B"
    
  11. Lặp lại kiểm tra tệp hệ thống để đảm bảo các sự cố đã được khắc phục:

    sfc /scannow
    

Người giới thiệu


Cảm ơn bạn. SFC /SCANNOWsau đó không gặp vấn đề gì.
Carlos Gil

Thật tuyệt vời! Tại sao bạn không viết một hướng dẫn trong Eightforums.com hoặc tương tự?
Milind R

Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.