
我有一個用 FAT32 格式化的 64GB USB 驅動器,有點混亂,想在 Ubuntu 18.04 上修復它。
第一次嘗試:
$ sudo fsck.vfat /dev/sdc1
fsck.fat 4.1 (2017-01-24)
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
? 1
Reclaimed 4221 unused clusters (138313728 bytes).
Free cluster summary wrong (1484695 vs. really 1488915)
1) Correct
2) Don't correct
? 1
Perform changes ? (y/n) y
/dev/sdc1: 20 files, 402763/1891678 clusters
$
但是,當我之後重新安裝驅動器時,損壞的檔案再次出現並阻止任何刪除它們的嘗試。我可以根據需要多次重新運行該命令,並獲得完全相同的結果。
第二次嘗試,基於如何修復損壞的 FAT32 檔案系統:
$ sudo fsck.vfat -w -r -v -l -a -t /dev/sdc1
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "THREES "
Media byte 0xf8 (hard disk)
512 bytes per logical sector
32768 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
7567872 bytes per FAT (= 14781 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15152128 (sector 29594)
1891678 data clusters (61986504704 bytes)
63 sectors/track, 32 heads
63 hidden sectors
121097025 sectors total
FATs differ but appear to be intact. Using first FAT.
Checking file /
[...]
Checking for bad clusters.
Reclaiming unconnected clusters.
Reclaimed 4221 unused clusters (138313728 bytes) in 1 chain.
Checking free cluster summary.
Free cluster summary wrong (1484695 vs. really 1484694)
Auto-correcting.
Performing changes.
/dev/sdc1: 21 files, 406984/1891678 clusters
相同的結果:fsck 發現錯誤,就像修復它們一樣,但檔案系統之後似乎完全沒有變化,所有損壞的檔案仍然存在。
當然,檔案系統在 fsck 之前已被卸載。我缺什麼?
答案1
有可能該驅動器“陷入僵局”,這意味著它看起來沒問題,但實際上是唯讀的(硬體是只讀的)。這有時是失敗的第一階段。
但如果你幸運的話,還有另一個錯誤,你就可以解決這個問題。
- 我建議您先將所有檔案(您想要保留的)複製到另一個磁碟機。
- 之後,您可以嘗試在裝有 Windows 的電腦上修復磁碟機。
- 如果仍然不成功,請嘗試擦除磁碟機的第一個 MB,然後建立新的分割表和檔案系統。
有更多詳細信息,請訪問這個連結。