2014 年,我的婚礼摄影师给我发了一些他拍摄的照片,这些照片不值得打印在 U 盘上。上周,我试图查看这些照片,但大多数照片现在都已损坏。
遵循以下提示这个答案,我尝试了以下方法来修复 USB 驱动器:
$ sudo dosfsck -w -r -l -a -v -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 "MSDOS5.0"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
8192 bytes per cluster
38 reserved sectors
First FAT starts at byte 19456 (sector 38)
2 FATs, 32 bit entries
7918080 bytes per FAT (= 15465 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15855616 (sector 30968)
1979497 data clusters (16216039424 bytes)
63 sectors/track, 255 heads
112 hidden sectors
31702928 sectors total
FATs differ but appear to be intact. Using first FAT.
Write 7917996 bytes at 7937536:Operation not permitted
经过进一步调查后,我意识到 USB 密钥被设置为只读,可能是由其硬件决定的,尽管我在任何地方都找不到任何开关。
因此,我在文件系统上创建了 USB 密钥的磁盘映像,然后再次运行该命令:
$ sudo dosfsck -w -r -l -a -v -t /dev/loop12p1
fsck.fat 4.1 (2017-01-24)
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
8192 bytes per cluster
38 reserved sectors
First FAT starts at byte 19456 (sector 38)
2 FATs, 32 bit entries
7918080 bytes per FAT (= 15465 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15855616 (sector 30968)
1979497 data clusters (16216039424 bytes)
63 sectors/track, 255 heads
112 hidden sectors
31702928 sectors total
FATs differ but appear to be intact. Using first FAT.
Write 7917996 bytes at 7937536:Operation not permitted
结果相同。
当安装此磁盘映像时,使用时我可以读取以下内容mount
:
$ mount
(truncated output)
/dev/loop12p1 on /media/mick/A & M type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
现在我几乎陷入了困境。我该如何解决磁盘映像或 USB 密钥本身的只读限制?