我收到了一些看起来是假的闪存驱动器。丝印显示 64 个演出,它们在操作系统中显示为 64 个演出。
但是,如果您尝试写入任何大于 4 gig 的文件,该文件就会损坏。
如何快速判断闪存驱动器/sd 卡是否是假的,以及实际大小是多少?
旁注:
我知道 h2testw,但它是德语的,而且我觉得它极难使用。我正在寻找替代程序,或者从命令行执行此操作的方法。
任何平台都可以。
Ign*_*ams 19
直接打开卡设备,写入0x00到标签上的容量即可。写入0x55 0xff 0xaa前三个字节,并查找任何0x00不超过标签容量的非字节。如果你找到一张,那张卡要么是假的,要么是有缺陷的。如果你发现0x55 0xff 0xaa......肯定是假的。
dd if=/dev/zero of=/dev/mmcblkX bs=16M count=...
echo -e -n '\x55\xff\xaa' > /dev/mmcblkX
hexdump /dev/mmcblkX
Run Code Online (Sandbox Code Playgroud)
mal*_*lat 10
我相信这也是值得一提的 h2testw 的替代品:f3。
文档位于:
在我的系统上:
$ sudo apt-get install f3
Run Code Online (Sandbox Code Playgroud)
最基本的用法很简单:
$ sudo f3probe --destructive --time-ops /dev/mmcblk0
Run Code Online (Sandbox Code Playgroud)
或者
$ sudo f3probe --destructive --time-ops /dev/sdb
Run Code Online (Sandbox Code Playgroud)
取决于您的系统如何看待 SD 卡读卡器。
在我的系统上,这个报告:
F3 probe 6.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
WARNING: Probing normally takes from a few seconds to 15 minutes, but
it can take longer. Please be patient.
Bad news: The device `/dev/sdb' is a counterfeit of type limbo
You can "fix" this device using the following command:
f3fix --last-sec=7860034 /dev/sdb
Device geometry:
*Usable* size: 3.75 GB (7860035 blocks)
Announced size: 15.62 GB (32768000 blocks)
Module: 16.00 GB (2^34 Bytes)
Approximate cache size: 1.00 MB (2048 blocks), need-reset=no
Physical block size: 512.00 Byte (2^9 Bytes)
Probe time: 1'11"
Operation: total time / count = avg time
Read: 336.9ms / 4260 = 79us
Write: 1'10" / 57554 = 1.2ms
Reset: 164.9ms / 1 = 164.9ms
Run Code Online (Sandbox Code Playgroud)
如果您不能使用f3probe,则必须使用旧方法(f3write后跟f3read):
$ f3write /media/malat/NEW\ VOLUME
Free space: 15.61 GB
Creating file 1.h2w ... OK!
Creating file 2.h2w ... OK!
Creating file 3.h2w ... OK!
Creating file 4.h2w ... OK!
Creating file 5.h2w ... OK!
Creating file 6.h2w ... OK!
Creating file 7.h2w ... OK!
Creating file 8.h2w ... OK!
Creating file 9.h2w ... OK!
Creating file 10.h2w ... OK!
Creating file 11.h2w ... OK!
Creating file 12.h2w ... OK!
Creating file 13.h2w ... OK!
Creating file 14.h2w ... OK!
Creating file 15.h2w ... OK!
Creating file 16.h2w ... OK!
Free space: 0.00 Byte
Average writing speed: 8.48 MB/s
$ f3read /media/malat/NEW\ VOLUME
SECTORS ok/corrupted/changed/overwritten
Validating file 1.h2w ... 2097152/ 0/ 0/ 0
Validating file 2.h2w ... 2097152/ 0/ 0/ 0
Validating file 3.h2w ... 2097152/ 0/ 0/ 0
Validating file 4.h2w ... 1533687/ 563465/ 0/ 0
Validating file 5.h2w ... 0/ 2097152/ 0/ 0
Validating file 6.h2w ... 0/ 2097152/ 0/ 0
Validating file 7.h2w ... 0/ 2097152/ 0/ 0
Validating file 8.h2w ... 0/ 2097152/ 0/ 0
Validating file 9.h2w ... 0/ 2097152/ 0/ 0
Validating file 10.h2w ... 0/ 2097152/ 0/ 0
Validating file 11.h2w ... 0/ 2097152/ 0/ 0
Validating file 12.h2w ... 0/ 2097152/ 0/ 0
Validating file 13.h2w ... 0/ 2097152/ 0/ 0
Validating file 14.h2w ... 0/ 2097152/ 0/ 0
Validating file 15.h2w ... 0/ 2097152/ 0/ 0
Validating file 16.h2w ... 16/ 1273792/ 0/ 0
Data OK: 3.73 GB (7825159 sectors)
Data LOST: 11.88 GB (24905929 sectors)
Corrupted: 11.88 GB (24905929 sectors)
Slightly changed: 0.00 Byte (0 sectors)
Overwritten: 0.00 Byte (0 sectors)
Average reading speed: 3.20 MB/s
Run Code Online (Sandbox Code Playgroud)
鉴于问题出现在 4GB 的文件大小时,卡上正在使用什么文件系统?
如果是 FAT32,您看到的问题可能是由 FAT32 的文件大小上限为 4GB 引起的。有关更多信息,请参阅http://en.wikipedia.org/wiki/File_Allocation_Table#FAT32
在 Windows 上,您可以通过右键单击“我的电脑”中的设备并选择属性来识别文件系统。查看“文件系统”字段。
| 归档时间: |
|
| 查看次数: |
5988 次 |
| 最近记录: |