From 6b9f261f7d1af0eb8dddb1531b30cf5eb6f1dc4b Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 17 Nov 2024 13:12:14 +0100 Subject: [PATCH] chore: add notes about deleting partitions and testing sd cards --- knowledge base/f3.md | 66 +++++++++++++++++++++++++++++++++++ snippets/check sd cards.sh | 6 ++++ snippets/delete partitions.sh | 6 ++++ 3 files changed, 78 insertions(+) create mode 100644 knowledge base/f3.md create mode 100644 snippets/check sd cards.sh create mode 100644 snippets/delete partitions.sh diff --git a/knowledge base/f3.md b/knowledge base/f3.md new file mode 100644 index 0000000..21ffe58 --- /dev/null +++ b/knowledge base/f3.md @@ -0,0 +1,66 @@ +# Fight Flash Fraud + +Tool to test flash cards' capacity and performance. + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) + 1. [Sources](#sources) + +## TL;DR + +It fills tested devices with pseudorandom data, then checks they return the same data on reading. + +
+ Setup + +```sh +brew install 'f3' +docker pull 'peron/f3' +port install 'f3' +``` + +
+ +
+ Usage + +```sh +# Test drives +# Destroys stored data +sudo f3probe --destructive --time-ops '/dev/sdb' +docker run -it --rm --device '/dev/sdb' 'peron/f3' f3probe --destructive --time-ops '/dev/sdb' +``` + +
+ + + +## Further readings + +- [Codebase] + +### Sources + +- [Documentation] + + + + + + + +[codebase]: https://github.com/AltraMayor/f3 +[documentation]: https://fight-flash-fraud.readthedocs.io/en/stable/ + + diff --git a/snippets/check sd cards.sh b/snippets/check sd cards.sh new file mode 100644 index 0000000..67142f9 --- /dev/null +++ b/snippets/check sd cards.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +# Test drives +# Destroys stored data +sudo f3probe --destructive --time-ops '/dev/sdb' +docker run -it --rm --device '/dev/sdb' 'peron/f3' f3probe --destructive --time-ops '/dev/sdb' diff --git a/snippets/delete partitions.sh b/snippets/delete partitions.sh new file mode 100644 index 0000000..d2cf2be --- /dev/null +++ b/snippets/delete partitions.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +# Does *not* ask for confirmation +sfdisk --delete '/dev/sda' + +wipefs -a '/dev/sda'