chore: add notes about deleting partitions and testing sd cards

This commit is contained in:
Michele Cereda
2024-11-17 13:12:14 +01:00
parent 8c634a0da6
commit 6b9f261f7d
3 changed files with 78 additions and 0 deletions

66
knowledge base/f3.md Normal file
View File

@@ -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.
<details>
<summary>Setup</summary>
```sh
brew install 'f3'
docker pull 'peron/f3'
port install 'f3'
```
</details>
<details>
<summary>Usage</summary>
```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'
```
</details>
<!-- Uncomment if used
<details>
<summary>Real world use cases</summary>
```sh
```
</details>
-->
## Further readings
- [Codebase]
### Sources
- [Documentation]
<!--
Reference
═╬═Time══
-->
<!-- In-article sections -->
<!-- Knowledge base -->
<!-- Files -->
<!-- Upstream -->
[codebase]: https://github.com/AltraMayor/f3
[documentation]: https://fight-flash-fraud.readthedocs.io/en/stable/
<!-- Others -->

View File

@@ -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'

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env sh
# Does *not* ask for confirmation
sfdisk --delete '/dev/sda'
wipefs -a '/dev/sda'