UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Testing SD cards (and other memory)

    Scheduled Pinned Locked Moved Support
    1 Posts 1 Posters 112 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • G Offline
        guru
        last edited by

        I have installed (compiled in a chroot'ed system on my BQ E4.5) a small tool f3write which tests a SD by writing a random byte pattern into files of 1 GByte size and a checksum for each file into it. Its counterpart f3read can be used to read the files again and see if their contents match the checksums. See below. The source for the tool can be fetched from here: https://codeload.github.com/AltraMayor/f3/tar.gz/v6.0?dummy=/AltraMayor-f3-v6.0_GH0.tar.gz

        This tool helps as well against companies selling write only USB sticks or other memory, "1 TByte for 10 Euro", but you can only write (without any error) and never read back your important files.

        # bin/f3write /media/phablet/9CC0-D6CE
        Free space: 15.42 GB
        Creating file 1.h2w ... OK!
        Creating file 2.h2w ... OK!
        Creating file 3.h2w ... OK!
        ...
        
        Free space: 0.00 Byte
        Average writing speed: 12.35 MB/s
        
        
        # ls -l /media/phablet/9CC0-D6CE
        total 16170552
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:14 10.h2w
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:16 11.h2w
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:17 12.h2w
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:19 13.h2w
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:20 14.h2w
        -rw-r--r-- 1 phablet phablet 1073741824 Apr 24 13:21 15.h2w
        ...
        
        # bin/f3read /media/phablet/9CC0-D6CE
                          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 ...    8259/        0/      0/      0
        ...
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post