mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: add notes about deleting partitions and testing sd cards
This commit is contained in:
66
knowledge base/f3.md
Normal file
66
knowledge base/f3.md
Normal 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 -->
|
||||||
6
snippets/check sd cards.sh
Normal file
6
snippets/check sd cards.sh
Normal 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'
|
||||||
6
snippets/delete partitions.sh
Normal file
6
snippets/delete partitions.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Does *not* ask for confirmation
|
||||||
|
sfdisk --delete '/dev/sda'
|
||||||
|
|
||||||
|
wipefs -a '/dev/sda'
|
||||||
Reference in New Issue
Block a user