U盘文件全部变成只读模式的解决办法
解决方法:
1. 在Linux系统(ubuntu)中运行如下命令
tail -f /var/log/syslog
2. 插入有只读文件系统故障的U盘
3. 观察命令行输出
输出局部如下:
Jul 8 16:44:50 cslouis-pc kernel: [15595.155904] FAT: Filesystem error (dev sdb4)
Jul 8 16:44:50 cslouis-pc kernel: [15595.155905] fat_get_cluster: invalid cluster chain (i_pos 0)
这表明U盘挂载的文件系统是/dev/sdb4,且文件系统有故障(FAT: Filesystem error)
4. 输入umountU盘命令(注意:此时文件系统还在)
umount /media/* (*是你的U盘名,可以在media目录下查看)
5. 修复U盘文件系统故障
sudo dosfsck -v -a /dev/sdb4
输出:
dosfsck 3.0.9 (31 Jan 2010)
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
36 reserved sectors
First FAT starts at byte 18432 (sector 36)
2 FATs, 32 bit entries
7801856 bytes per FAT (= 15238 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15622144 (sector 30512)
1950354 data clusters (7988649984 bytes)
63 sectors/track, 255 heads
63 hidden sectors
15633345 sectors total
FATs differ but appear to be intact. Using first FAT.
/UNIX:8r4:6MP
Contains a free cluster (7168). Assuming EOF.
Reclaiming unconnected clusters.
Reclaimed 28283 unused clusters (115847168 bytes) in 16 chains.
Checking free cluster summary.
Performing changes.
/dev/sdb4: 3847 files, 488059/1950354 clusters
赞 (0)