非根目录没有 . 和 .. 两项目
请注意这句话:If -a and -r are absent, the file system is only checked, but not repaired.
推荐这样使用:
./dosfsck -arV -w /dev/sda (该命令类似于dos下的chkdsk)
结果修复无效(如果这个指令有效,建议可以在程序中整合dosfsck修复的代码),看了只能重新格掉了
david@raptor:/media$ fsck /dev/sdb1
fsck 1.40.2 (12-Jul-2007)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
? 1
Reclaimed 416900 unused clusters (1707622400 bytes).
Free cluster summary wrong (584604 vs. really 1001504)
1) Correct
2) Don't correct
? 1
Leaving file system unchanged.
/dev/sdb1: 0 files, 1/1001505 clusters
david@raptor:/media$ fsck /dev/sdb1
fsck 1.40.2 (12-Jul-2007)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
? 2
Reclaimed 418050 unused clusters (1712332800 bytes).
Free cluster summary wrong (584604 vs. really 1001504)
1) Correct
2) Don't correct
? 1
Leaving file system unchanged.
/dev/sdb1: 0 files, 1/1001505 clusters
david@raptor:/media$