dwipe 2.0.1__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dwipe-2.0.1 → dwipe-2.0.2}/.gitignore +1 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/PKG-INFO +69 -33
- {dwipe-2.0.1 → dwipe-2.0.2}/README.md +67 -31
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/DeviceInfo.py +183 -52
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/DiskWipe.py +495 -180
- dwipe-2.0.2/dwipe/DrivePreChecker.py +90 -0
- dwipe-2.0.2/dwipe/FirmwareWipeTask.py +370 -0
- dwipe-2.0.2/dwipe/LsblkMonitor.py +124 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/PersistentState.py +26 -8
- dwipe-2.0.2/dwipe/Prereqs.py +84 -0
- dwipe-2.0.2/dwipe/StructuredLogger.py +643 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/ToolManager.py +235 -254
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/Utils.py +108 -0
- dwipe-2.0.2/dwipe/VerifyTask.py +410 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/WipeJob.py +613 -165
- dwipe-2.0.2/dwipe/WipeTask.py +148 -0
- dwipe-2.0.2/dwipe/WriteTask.py +402 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/main.py +14 -9
- dwipe-2.0.2/linter +6 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/pyproject.toml +2 -2
- dwipe-2.0.1/demo/DiskWiperThrottled.py +0 -398
- dwipe-2.0.1/demo/IMPLEMENTATION_SUMMARY.md +0 -227
- dwipe-2.0.1/demo/QUICKSTART_THROTTLE.md +0 -102
- dwipe-2.0.1/demo/THROTTLING.md +0 -172
- dwipe-2.0.1/demo/o_direct_example.py +0 -233
- dwipe-2.0.1/demo/test_buffered_sync_speed.py +0 -150
- dwipe-2.0.1/demo/test_direct_proper.py +0 -152
- dwipe-2.0.1/demo/test_direct_speed.py +0 -159
- dwipe-2.0.1/demo/test_osync_speed.py +0 -131
- dwipe-2.0.1/demo/test_smart_throttle.py +0 -105
- dwipe-2.0.1/demo/test_throttle.py +0 -82
- dwipe-2.0.1/demo/test_wipejob_debug.py +0 -79
- dwipe-2.0.1/demo/test_wipejob_odirect.py +0 -151
- dwipe-2.0.1/dwipe/WipeJobFuture.py +0 -245
- {dwipe-2.0.1 → dwipe-2.0.2}/LICENSE +0 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/dwipe/__init__.py +0 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/images/dwipe-2025-12-31-09-37.gif +0 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/resources/dwipe-help-screen.png +0 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/resources/dwipe-main-screen.png +0 -0
- {dwipe-2.0.1 → dwipe-2.0.2}/runner +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dwipe
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: A tool to wipe disks and partitions for Linux
|
|
5
5
|
Keywords: disk,partition,wipe,clean,scrub
|
|
6
6
|
Author-email: Joe Defen <joedef@google.com>
|
|
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Operating System :: POSIX :: Linux
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: console-window == 1.
|
|
13
|
+
Requires-Dist: console-window == 1.4.2
|
|
14
14
|
Project-URL: Bug Tracker, https://github.com/joedefen/dwipe/issues
|
|
15
15
|
Project-URL: Homepage, https://github.com/joedefen/dwipe
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ Project-URL: Homepage, https://github.com/joedefen/dwipe
|
|
|
25
25
|
| Interactive TUI | ✓ | ✓ | ✗ | ✗ |
|
|
26
26
|
| Multiple simultaneous wipes | ✓ | ✗ | ✗ | ✗ |
|
|
27
27
|
| Hot-swap detection | ✓ | ✗ | ✗ | ✗ |
|
|
28
|
-
| Device/partition
|
|
28
|
+
| Device/partition blocking | ✓ | ✗ | ✗ | ✗ |
|
|
29
29
|
| Persistent wipe state | ✓ | ✗ | ✗ | ✗ |
|
|
30
30
|
| Resume interrupted wipes | ✓ | ✗ | ✗ | ✗ |
|
|
31
31
|
| Wipe operation logging | ✓ | ✗ | ✗ | ✗ |
|
|
@@ -38,6 +38,37 @@ Project-URL: Homepage, https://github.com/joedefen/dwipe
|
|
|
38
38
|
> * **Modern drives are reliably wiped with one pass of zeros**; just zero once in almost all cases for best, fastest results.
|
|
39
39
|
> * `dwipe` offers Multi-pass and Rand modes as "checkbox" features, but those provide no additional security on drives manufactured after 2001 (NIST SP 800-88).
|
|
40
40
|
|
|
41
|
+
## **V3 Features** (Partly in V2.x)
|
|
42
|
+
|
|
43
|
+
> Features added since initial V2 deployment (may not be in a demo until V3).
|
|
44
|
+
|
|
45
|
+
* **Port and Serial number**. Press `p` to control port and serial number; it adds another line per disk and you may want to use it selectively. You may choose "Off" (not shown), "On" (always shown), or the default "Auto" show if the disk is in a state allowed for wiping (e.g., no mounted partitions).
|
|
46
|
+
* **Fast SATA Release**. If you press `DEL` on a SATA drive in a hot-swap bay (and not mounted or otherwise busy):
|
|
47
|
+
* it will be removed from the OS managed devices,
|
|
48
|
+
* when gone from the `dwipe` screen, you can then pull out the device, and insert another one.
|
|
49
|
+
* So, replacing the drive can take just seconds, not minutes awaiting SATA timeouts.
|
|
50
|
+
* **Background device monitoring** - Faster and more efficient hot-swap detection with dedicated monitoring thread:
|
|
51
|
+
- Monitors `/sys/class/block` and `/proc/partitions` for device changes
|
|
52
|
+
- Runs `lsblk` only when changes detected (previously ran every refresh)
|
|
53
|
+
- Reduces CPU usage and improves responsiveness
|
|
54
|
+
- Faster detection of newly inserted or removed devices
|
|
55
|
+
* **Lock renamed Block** - To reduce confusion, the "lock" feature is renamed.
|
|
56
|
+
- "Blocking" a partition or disk is only effective within the running app.
|
|
57
|
+
- It prevents wiping w/o first unblocking even if unmounted or otherwise it a wipeable state.
|
|
58
|
+
- It does not system level lock of any type.
|
|
59
|
+
* **Hardware-based firmware wipes (EXPERIMENTAL/ALPHA)** - Full support for firmware-level secure erase operations:
|
|
60
|
+
- **⚠️ Requires `--firmware-wipes` flag to enable (disabled by default)**
|
|
61
|
+
- **NVMe Sanitize**: Crypto Erase, Block Erase, and Overwrite operations via `nvme-cli`
|
|
62
|
+
- **NVMe Format**: Secure format with optional crypto erase
|
|
63
|
+
- **SATA ATA Security Erase**: Normal and Enhanced erase modes via `hdparm`
|
|
64
|
+
- Automatic capability detection shows only supported methods for each drive
|
|
65
|
+
- Firmware wipes are much faster than software wipes (seconds to minutes vs hours)
|
|
66
|
+
- Same user interface - firmware options appear alongside Zero/Rand in wipe confirmation
|
|
67
|
+
- Progress tracking with "FW" indicator to show hardware operation in progress
|
|
68
|
+
- Persistent markers track firmware wipe completion and method used
|
|
69
|
+
- See [FIRMWARE_WIPES.md](FIRMWARE_WIPES.md) for technical details
|
|
70
|
+
- **Note**: This feature is experimental; software wipes are recommended for most users
|
|
71
|
+
|
|
41
72
|
## **V2 Features**
|
|
42
73
|
|
|
43
74
|
* **Statistical verification** - Automatic or on-demand verification with intelligent pattern detection:
|
|
@@ -51,23 +82,23 @@ Project-URL: Homepage, https://github.com/joedefen/dwipe
|
|
|
51
82
|
* **Configurable confirmation modes** - Choose your safety level: single keypress (Y/y), typed confirmation (YES/yes), or device name (cycle with **c** key)
|
|
52
83
|
* **Enhanced wipe history** - Detailed log viewer (**h** key) shows wipe history with UUIDs, filesystems, labels, and percentages for stopped wipes
|
|
53
84
|
* **Active wipe highlighting** - In-progress wipes displayed in bright cyan/blue with elapsed time, remaining time, and transfer speed (0-100% write, 101-200% verify)
|
|
54
|
-
* **Persistent user preferences** - Theme, wipe mode (Rand/Zero/Rand+V/Zero+V), confirmation mode, verification %, and
|
|
55
|
-
* **Individual partition
|
|
85
|
+
* **Persistent user preferences** - Theme, wipe mode (Rand/Zero/Rand+V/Zero+V), confirmation mode, verification %, and blocked devices persist across sessions (saved to `~/.config/dwipe/state.json`)
|
|
86
|
+
* **Individual partition blocking** - Block individual partitions to prevent accidental wiping (previously only whole disks could be blocked)
|
|
56
87
|
* **Full terminal color themes** - Complete themed color schemes with backgrounds, not just highlights (cycle with **t** key)
|
|
57
|
-
* **Visual feedback improvements** - Mounted and
|
|
88
|
+
* **Visual feedback improvements** - Mounted and blocked devices appear dimmed; active wipes are bright and prominent
|
|
58
89
|
* **Smart device identification** - Uses UUID/PARTUUID/serial numbers for stable device tracking across reconnections
|
|
59
90
|
* **Screen-based navigation** - Modern screen stack architecture with help screen (**?**) and history screen (**h**)
|
|
60
91
|
* **Direct I/O to Disk** - Wiping is done with direct I/O which is fast and avoid polluting your page cache. Writer threads are given lower than normal I/O priority to play nice with other apps. This makes stopping jobs fast and certain.
|
|
61
92
|
* **Improved Handling of Bad Disks.** Now detects (sometimes corrects) write failures, slowdowns, excessive no progress, and reports/aborts hopeless or hopelessly slow wipes.
|
|
62
93
|
|
|
63
|
-
## **V2.x Features**
|
|
64
|
-
Features added since V2 deployed (may not be in latest demo):
|
|
65
|
-
* **Port and Serial number**. Press `p` to toggle whether port and serial number is show; it adds another line per disk and you may want to use it selectively.
|
|
66
94
|
## Requirements
|
|
67
95
|
- **Linux operating system** (uses `/dev/`, `/sys/`, `/proc/` interfaces)
|
|
68
96
|
- **Python 3.8 or higher**
|
|
69
97
|
- **Root/sudo privileges** (automatically requested when you run the tool)
|
|
70
98
|
- **lsblk utility** (usually pre-installed on most Linux distributions)
|
|
99
|
+
- **Optional (for firmware wipes only):**
|
|
100
|
+
- `nvme-cli` - For NVMe Sanitize and Format operations
|
|
101
|
+
- `hdparm` - For SATA ATA Security Erase operations
|
|
71
102
|
|
|
72
103
|
## Installation
|
|
73
104
|
|
|
@@ -87,28 +118,37 @@ Features added since V2 deployed (may not be in latest demo):
|
|
|
87
118
|
`dwipe` provides comprehensive disk wiping capabilities with safety features:
|
|
88
119
|
|
|
89
120
|
* **Smart device display** - Shows disks and partitions with labels, sizes, types, and vendor/model information to help identify devices correctly
|
|
90
|
-
* **Safety protections** - Prevents wiping mounted devices, detects overlapping wipes, supports manual disk
|
|
121
|
+
* **Safety protections** - Prevents wiping mounted devices, detects overlapping wipes, supports manual disk blocking
|
|
91
122
|
* **Hot-swap detection** - Updates the device list when storage changes; newly added devices are marked with **^** to make them easy to spot
|
|
92
123
|
* **Multiple simultaneous wipes** - Start wipes on multiple devices at once, with individual progress tracking and completion states
|
|
93
124
|
* **Flexible wipe modes** - Choose between Rand, Zero, Rand+V (with auto-verify), or Zero+V (with auto-verify). Multi-pass modes alternate patterns for improved data destruction
|
|
94
125
|
* **Persistent state tracking** - Wipe status survives reboots; partially wiped (**s**) and completed (**W**) states are stored on the device
|
|
95
126
|
* **Device filtering** - Filter devices by name/pattern using regex in case of too many for one screen
|
|
96
127
|
* **Stop capability** - Stop individual wipes or all wipes in progress
|
|
97
|
-
* **Disk
|
|
98
|
-
* **Dry-run mode** - Practice using the interface without risk using `--dry-run`
|
|
128
|
+
* **Disk blocking** - Manually block disks to prevent accidental wipes (blocks hide all partitions)
|
|
99
129
|
|
|
100
130
|
|
|
101
131
|
> **Note:** `dwipe` shows file system labels, and if not available, the partition label. It is best practice to label partitions and file systems well to make selection easier.
|
|
102
|
-
|
|
132
|
+
|
|
103
133
|
## Usage
|
|
104
134
|
|
|
105
135
|
Simply run `dwipe` from the command line without arguments: `dwipe`
|
|
106
136
|
|
|
137
|
+
### Command-Line Options
|
|
138
|
+
|
|
139
|
+
- `--firmware-wipes` or `-F` - Enable experimental (alpha) firmware wipes
|
|
140
|
+
- Enables hardware-based secure erase operations (NVMe Sanitize/Format, SATA ATA Security Erase)
|
|
141
|
+
- Requires `nvme-cli` and `hdparm` tools to be installed
|
|
142
|
+
- Without this flag, only software wipes (Zero/Rand) are available
|
|
143
|
+
- **Warning**: This feature is experimental and should be used with caution
|
|
144
|
+
- `--dump-lsblk` - Dump parsed device information and exit (for debugging)
|
|
145
|
+
- `--help` - Show help message with all available options
|
|
146
|
+
|
|
107
147
|
### Color Legend
|
|
108
148
|
|
|
109
149
|
`dwipe` uses color coding to provide instant visual feedback about device and operation status:
|
|
110
150
|
|
|
111
|
-
- **Dimmed (gray)** - Mounted or
|
|
151
|
+
- **Dimmed (gray)** - Mounted or blocked devices (cannot be wiped)
|
|
112
152
|
- **Default (white)** - Ready to wipe, idle state, or previously wiped (before this session)
|
|
113
153
|
- **Bright cyan/blue + bold** - Active wipe or verification in progress (0-100% write, v0-v100% verify)
|
|
114
154
|
- **Bold yellow** - Stopped or partially completed wipe
|
|
@@ -156,8 +196,8 @@ The **STATE** column shows the current status of each device:
|
|
|
156
196
|
| **STOP** | Wipe or verification is being stopped |
|
|
157
197
|
| **s** | Wipe was stopped - device is partially wiped (can restart or verify) |
|
|
158
198
|
| **W** | Wipe was completed successfully (can wipe again or verify) |
|
|
159
|
-
| **
|
|
160
|
-
| **
|
|
199
|
+
| **Blk** | Disk is manually blocked - partitions are hidden and cannot be wiped |
|
|
200
|
+
| **Unbl** | Disk was just unblocked (transitory state) |
|
|
161
201
|
|
|
162
202
|
### Available Actions
|
|
163
203
|
|
|
@@ -169,42 +209,39 @@ The top line shows available actions. Some are context-sensitive (only available
|
|
|
169
209
|
| **v** | verify | Verify a wiped device or detect pattern on unmarked disk (context-sensitive) |
|
|
170
210
|
| **s** | stop | Stop the selected wipe in progress (context-sensitive) |
|
|
171
211
|
| **S** | Stop All | Stop all wipes in progress |
|
|
172
|
-
| **
|
|
212
|
+
| **b** | block/unblock | Block or unblock a disk to prevent accidental wiping |
|
|
173
213
|
| **q** or **x** | quit | Quit the application (stops all wipes first) |
|
|
174
214
|
| **?** | help | Show help screen with all actions and navigation keys |
|
|
175
215
|
| **h** | history | Show wipe history log |
|
|
176
216
|
| **/** | filter | Filter devices by regex pattern (shows matching devices + all active wipes) |
|
|
177
217
|
| **ESC** | clear filter | Clear the filter and jump to top of list |
|
|
178
|
-
| **
|
|
218
|
+
| **ESC** | back | Return to previous screen if on nested screen |
|
|
219
|
+
| **m** | mode | Cycle auto verify mode: +V (verify), -V (don't) [saved as preference] |
|
|
179
220
|
| **P** | passes | Cycle wipe passes: 1, 2, or 4 (saved as preference) |
|
|
180
221
|
| **V** | verify % | Cycle verification percentage: 0%, 2%, 5%, 10%, 25%, 50%, 100% (saved as preference) |
|
|
181
|
-
| **c** | confirmation | Cycle confirmation mode: Y, y, YES, yes, device name (saved as preference) |
|
|
182
|
-
| **d** | dirty limit | Cycle dirty page limit: 0, 500, 1000, 2000, 4000 MB (saved as preference) |
|
|
183
222
|
| **D** | dense | Toggle dense/spaced view (saved as preference) |
|
|
184
223
|
| **t** | themes | Open theme preview screen to view and change color themes |
|
|
185
224
|
|
|
186
|
-
### Wipe
|
|
225
|
+
### Wipe Types
|
|
187
226
|
|
|
188
|
-
`dwipe` supports
|
|
227
|
+
`dwipe` supports several wipe modes.
|
|
189
228
|
|
|
190
229
|
- **Zero** - Fills the device with zeros (multi-pass alternates random/zero patterns, ending on zeros)
|
|
191
|
-
- **Zero+V** - Same as Zero, but automatically verifies after wipe completes (if verify % > 0)
|
|
192
230
|
- **Rand** - Fills the device with random data (multi-pass alternates zero/random patterns, ending on random)
|
|
193
|
-
- **
|
|
231
|
+
- **Firmware wipes** - TBD
|
|
194
232
|
|
|
195
233
|
The `+V` suffix indicates automatic verification after wipe completion. Without `+V`, you can still manually verify by pressing **v** on a wiped device.
|
|
196
234
|
|
|
197
|
-
> **Note:** Multi-pass wipes (2 or 4 passes) alternate between zero and random patterns to ensure different bit patterns physically overwrite the disk, ending on your selected mode.
|
|
235
|
+
> **Note:** Multi-pass sofware (Zero and Rand) wipes (2 or 4 passes) alternate between zero and random patterns to ensure different bit patterns physically overwrite the disk, ending on your selected mode.
|
|
198
236
|
|
|
199
237
|
### Resuming Stopped Wipes
|
|
200
238
|
|
|
201
|
-
Stopped wipes (state **s**) can be resumed by pressing **w** on the device
|
|
239
|
+
Stopped wipes (state **s**) can be resumed by pressing **w** on the device. Choose the same type of wipe or it will start over at 0% complete.
|
|
202
240
|
|
|
203
241
|
**How Resume Works:**
|
|
204
242
|
- Preserves the original wipe mode (Rand or Zero) from when the wipe was started
|
|
205
243
|
- Uses the **current** passes setting to determine how much more to write
|
|
206
|
-
- Continues from the exact byte offset where it stopped (rounded to buffer boundary)
|
|
207
|
-
- Smart validation ensures interrupted wipes resume with correct pattern integrity
|
|
244
|
+
- Continues from the exact byte offset where it marked that stopped (rounded to buffer boundary). "Marks" are written about every 30s so for non-gracefully ended wipes, the position may be as much as 30s (or somewhat more) from the last wiped disk blocks.
|
|
208
245
|
|
|
209
246
|
**Resume Examples:**
|
|
210
247
|
|
|
@@ -259,7 +296,7 @@ Stopped wipes (state **s**) can be resumed by pressing **w** on the device:
|
|
|
259
296
|
|
|
260
297
|
### Progress Information
|
|
261
298
|
|
|
262
|
-
When wiping a device, `dwipe` displays:
|
|
299
|
+
When software wiping a device, `dwipe` displays:
|
|
263
300
|
- **Elapsed time** - Time since wipe started (e.g., 1m18s)
|
|
264
301
|
- **Remaining time** - Estimated time to completion (e.g., -3m6s)
|
|
265
302
|
- **Write rate** - Current throughput (e.g., "45.2MB/s")
|
|
@@ -317,7 +354,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
317
354
|
|
|
318
355
|
## Security Considerations
|
|
319
356
|
|
|
320
|
-
**Important limitations:**
|
|
357
|
+
**Important limitations of software wipes:**
|
|
321
358
|
|
|
322
359
|
- `dwipe` supports multi-pass wiping with alternating patterns, but does not implement specific DoD 5220.22-M or Gutmann certified pattern sequences
|
|
323
360
|
- More than adequate for **personal and business data** that doesn't require (antiquated) certified destruction
|
|
@@ -330,8 +367,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
330
367
|
|
|
331
368
|
**Best practices:**
|
|
332
369
|
- Verify device labels and sizes carefully before wiping
|
|
333
|
-
- Use the **
|
|
334
|
-
- Test with `--dry-run` first if unsure
|
|
370
|
+
- Use the **Block** feature to protect critical disks
|
|
335
371
|
- Consider encryption for sensitive data as the primary security measure
|
|
336
372
|
|
|
337
373
|
---
|
|
@@ -350,7 +386,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
350
386
|
### Wipe issues
|
|
351
387
|
- **Can't wipe a device** - Check the STATE column:
|
|
352
388
|
- **Mnt** - Unmount the partition first: `sudo umount /dev/sdXN`
|
|
353
|
-
- **
|
|
389
|
+
- **Blk** - Press **b** to unblock
|
|
354
390
|
- **Busy** - Another partition on the disk is being wiped
|
|
355
391
|
- **Wipe is very slow** - Normal for large drives; check write rate to verify progress
|
|
356
392
|
- **Wipe seems stuck** - Most likely due to bad disks; Direct I/O makes progress almost constant on good disks.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| Interactive TUI | ✓ | ✓ | ✗ | ✗ |
|
|
10
10
|
| Multiple simultaneous wipes | ✓ | ✗ | ✗ | ✗ |
|
|
11
11
|
| Hot-swap detection | ✓ | ✗ | ✗ | ✗ |
|
|
12
|
-
| Device/partition
|
|
12
|
+
| Device/partition blocking | ✓ | ✗ | ✗ | ✗ |
|
|
13
13
|
| Persistent wipe state | ✓ | ✗ | ✗ | ✗ |
|
|
14
14
|
| Resume interrupted wipes | ✓ | ✗ | ✗ | ✗ |
|
|
15
15
|
| Wipe operation logging | ✓ | ✗ | ✗ | ✗ |
|
|
@@ -22,6 +22,37 @@
|
|
|
22
22
|
> * **Modern drives are reliably wiped with one pass of zeros**; just zero once in almost all cases for best, fastest results.
|
|
23
23
|
> * `dwipe` offers Multi-pass and Rand modes as "checkbox" features, but those provide no additional security on drives manufactured after 2001 (NIST SP 800-88).
|
|
24
24
|
|
|
25
|
+
## **V3 Features** (Partly in V2.x)
|
|
26
|
+
|
|
27
|
+
> Features added since initial V2 deployment (may not be in a demo until V3).
|
|
28
|
+
|
|
29
|
+
* **Port and Serial number**. Press `p` to control port and serial number; it adds another line per disk and you may want to use it selectively. You may choose "Off" (not shown), "On" (always shown), or the default "Auto" show if the disk is in a state allowed for wiping (e.g., no mounted partitions).
|
|
30
|
+
* **Fast SATA Release**. If you press `DEL` on a SATA drive in a hot-swap bay (and not mounted or otherwise busy):
|
|
31
|
+
* it will be removed from the OS managed devices,
|
|
32
|
+
* when gone from the `dwipe` screen, you can then pull out the device, and insert another one.
|
|
33
|
+
* So, replacing the drive can take just seconds, not minutes awaiting SATA timeouts.
|
|
34
|
+
* **Background device monitoring** - Faster and more efficient hot-swap detection with dedicated monitoring thread:
|
|
35
|
+
- Monitors `/sys/class/block` and `/proc/partitions` for device changes
|
|
36
|
+
- Runs `lsblk` only when changes detected (previously ran every refresh)
|
|
37
|
+
- Reduces CPU usage and improves responsiveness
|
|
38
|
+
- Faster detection of newly inserted or removed devices
|
|
39
|
+
* **Lock renamed Block** - To reduce confusion, the "lock" feature is renamed.
|
|
40
|
+
- "Blocking" a partition or disk is only effective within the running app.
|
|
41
|
+
- It prevents wiping w/o first unblocking even if unmounted or otherwise it a wipeable state.
|
|
42
|
+
- It does not system level lock of any type.
|
|
43
|
+
* **Hardware-based firmware wipes (EXPERIMENTAL/ALPHA)** - Full support for firmware-level secure erase operations:
|
|
44
|
+
- **⚠️ Requires `--firmware-wipes` flag to enable (disabled by default)**
|
|
45
|
+
- **NVMe Sanitize**: Crypto Erase, Block Erase, and Overwrite operations via `nvme-cli`
|
|
46
|
+
- **NVMe Format**: Secure format with optional crypto erase
|
|
47
|
+
- **SATA ATA Security Erase**: Normal and Enhanced erase modes via `hdparm`
|
|
48
|
+
- Automatic capability detection shows only supported methods for each drive
|
|
49
|
+
- Firmware wipes are much faster than software wipes (seconds to minutes vs hours)
|
|
50
|
+
- Same user interface - firmware options appear alongside Zero/Rand in wipe confirmation
|
|
51
|
+
- Progress tracking with "FW" indicator to show hardware operation in progress
|
|
52
|
+
- Persistent markers track firmware wipe completion and method used
|
|
53
|
+
- See [FIRMWARE_WIPES.md](FIRMWARE_WIPES.md) for technical details
|
|
54
|
+
- **Note**: This feature is experimental; software wipes are recommended for most users
|
|
55
|
+
|
|
25
56
|
## **V2 Features**
|
|
26
57
|
|
|
27
58
|
* **Statistical verification** - Automatic or on-demand verification with intelligent pattern detection:
|
|
@@ -35,23 +66,23 @@
|
|
|
35
66
|
* **Configurable confirmation modes** - Choose your safety level: single keypress (Y/y), typed confirmation (YES/yes), or device name (cycle with **c** key)
|
|
36
67
|
* **Enhanced wipe history** - Detailed log viewer (**h** key) shows wipe history with UUIDs, filesystems, labels, and percentages for stopped wipes
|
|
37
68
|
* **Active wipe highlighting** - In-progress wipes displayed in bright cyan/blue with elapsed time, remaining time, and transfer speed (0-100% write, 101-200% verify)
|
|
38
|
-
* **Persistent user preferences** - Theme, wipe mode (Rand/Zero/Rand+V/Zero+V), confirmation mode, verification %, and
|
|
39
|
-
* **Individual partition
|
|
69
|
+
* **Persistent user preferences** - Theme, wipe mode (Rand/Zero/Rand+V/Zero+V), confirmation mode, verification %, and blocked devices persist across sessions (saved to `~/.config/dwipe/state.json`)
|
|
70
|
+
* **Individual partition blocking** - Block individual partitions to prevent accidental wiping (previously only whole disks could be blocked)
|
|
40
71
|
* **Full terminal color themes** - Complete themed color schemes with backgrounds, not just highlights (cycle with **t** key)
|
|
41
|
-
* **Visual feedback improvements** - Mounted and
|
|
72
|
+
* **Visual feedback improvements** - Mounted and blocked devices appear dimmed; active wipes are bright and prominent
|
|
42
73
|
* **Smart device identification** - Uses UUID/PARTUUID/serial numbers for stable device tracking across reconnections
|
|
43
74
|
* **Screen-based navigation** - Modern screen stack architecture with help screen (**?**) and history screen (**h**)
|
|
44
75
|
* **Direct I/O to Disk** - Wiping is done with direct I/O which is fast and avoid polluting your page cache. Writer threads are given lower than normal I/O priority to play nice with other apps. This makes stopping jobs fast and certain.
|
|
45
76
|
* **Improved Handling of Bad Disks.** Now detects (sometimes corrects) write failures, slowdowns, excessive no progress, and reports/aborts hopeless or hopelessly slow wipes.
|
|
46
77
|
|
|
47
|
-
## **V2.x Features**
|
|
48
|
-
Features added since V2 deployed (may not be in latest demo):
|
|
49
|
-
* **Port and Serial number**. Press `p` to toggle whether port and serial number is show; it adds another line per disk and you may want to use it selectively.
|
|
50
78
|
## Requirements
|
|
51
79
|
- **Linux operating system** (uses `/dev/`, `/sys/`, `/proc/` interfaces)
|
|
52
80
|
- **Python 3.8 or higher**
|
|
53
81
|
- **Root/sudo privileges** (automatically requested when you run the tool)
|
|
54
82
|
- **lsblk utility** (usually pre-installed on most Linux distributions)
|
|
83
|
+
- **Optional (for firmware wipes only):**
|
|
84
|
+
- `nvme-cli` - For NVMe Sanitize and Format operations
|
|
85
|
+
- `hdparm` - For SATA ATA Security Erase operations
|
|
55
86
|
|
|
56
87
|
## Installation
|
|
57
88
|
|
|
@@ -71,28 +102,37 @@ Features added since V2 deployed (may not be in latest demo):
|
|
|
71
102
|
`dwipe` provides comprehensive disk wiping capabilities with safety features:
|
|
72
103
|
|
|
73
104
|
* **Smart device display** - Shows disks and partitions with labels, sizes, types, and vendor/model information to help identify devices correctly
|
|
74
|
-
* **Safety protections** - Prevents wiping mounted devices, detects overlapping wipes, supports manual disk
|
|
105
|
+
* **Safety protections** - Prevents wiping mounted devices, detects overlapping wipes, supports manual disk blocking
|
|
75
106
|
* **Hot-swap detection** - Updates the device list when storage changes; newly added devices are marked with **^** to make them easy to spot
|
|
76
107
|
* **Multiple simultaneous wipes** - Start wipes on multiple devices at once, with individual progress tracking and completion states
|
|
77
108
|
* **Flexible wipe modes** - Choose between Rand, Zero, Rand+V (with auto-verify), or Zero+V (with auto-verify). Multi-pass modes alternate patterns for improved data destruction
|
|
78
109
|
* **Persistent state tracking** - Wipe status survives reboots; partially wiped (**s**) and completed (**W**) states are stored on the device
|
|
79
110
|
* **Device filtering** - Filter devices by name/pattern using regex in case of too many for one screen
|
|
80
111
|
* **Stop capability** - Stop individual wipes or all wipes in progress
|
|
81
|
-
* **Disk
|
|
82
|
-
* **Dry-run mode** - Practice using the interface without risk using `--dry-run`
|
|
112
|
+
* **Disk blocking** - Manually block disks to prevent accidental wipes (blocks hide all partitions)
|
|
83
113
|
|
|
84
114
|
|
|
85
115
|
> **Note:** `dwipe` shows file system labels, and if not available, the partition label. It is best practice to label partitions and file systems well to make selection easier.
|
|
86
|
-
|
|
116
|
+
|
|
87
117
|
## Usage
|
|
88
118
|
|
|
89
119
|
Simply run `dwipe` from the command line without arguments: `dwipe`
|
|
90
120
|
|
|
121
|
+
### Command-Line Options
|
|
122
|
+
|
|
123
|
+
- `--firmware-wipes` or `-F` - Enable experimental (alpha) firmware wipes
|
|
124
|
+
- Enables hardware-based secure erase operations (NVMe Sanitize/Format, SATA ATA Security Erase)
|
|
125
|
+
- Requires `nvme-cli` and `hdparm` tools to be installed
|
|
126
|
+
- Without this flag, only software wipes (Zero/Rand) are available
|
|
127
|
+
- **Warning**: This feature is experimental and should be used with caution
|
|
128
|
+
- `--dump-lsblk` - Dump parsed device information and exit (for debugging)
|
|
129
|
+
- `--help` - Show help message with all available options
|
|
130
|
+
|
|
91
131
|
### Color Legend
|
|
92
132
|
|
|
93
133
|
`dwipe` uses color coding to provide instant visual feedback about device and operation status:
|
|
94
134
|
|
|
95
|
-
- **Dimmed (gray)** - Mounted or
|
|
135
|
+
- **Dimmed (gray)** - Mounted or blocked devices (cannot be wiped)
|
|
96
136
|
- **Default (white)** - Ready to wipe, idle state, or previously wiped (before this session)
|
|
97
137
|
- **Bright cyan/blue + bold** - Active wipe or verification in progress (0-100% write, v0-v100% verify)
|
|
98
138
|
- **Bold yellow** - Stopped or partially completed wipe
|
|
@@ -140,8 +180,8 @@ The **STATE** column shows the current status of each device:
|
|
|
140
180
|
| **STOP** | Wipe or verification is being stopped |
|
|
141
181
|
| **s** | Wipe was stopped - device is partially wiped (can restart or verify) |
|
|
142
182
|
| **W** | Wipe was completed successfully (can wipe again or verify) |
|
|
143
|
-
| **
|
|
144
|
-
| **
|
|
183
|
+
| **Blk** | Disk is manually blocked - partitions are hidden and cannot be wiped |
|
|
184
|
+
| **Unbl** | Disk was just unblocked (transitory state) |
|
|
145
185
|
|
|
146
186
|
### Available Actions
|
|
147
187
|
|
|
@@ -153,42 +193,39 @@ The top line shows available actions. Some are context-sensitive (only available
|
|
|
153
193
|
| **v** | verify | Verify a wiped device or detect pattern on unmarked disk (context-sensitive) |
|
|
154
194
|
| **s** | stop | Stop the selected wipe in progress (context-sensitive) |
|
|
155
195
|
| **S** | Stop All | Stop all wipes in progress |
|
|
156
|
-
| **
|
|
196
|
+
| **b** | block/unblock | Block or unblock a disk to prevent accidental wiping |
|
|
157
197
|
| **q** or **x** | quit | Quit the application (stops all wipes first) |
|
|
158
198
|
| **?** | help | Show help screen with all actions and navigation keys |
|
|
159
199
|
| **h** | history | Show wipe history log |
|
|
160
200
|
| **/** | filter | Filter devices by regex pattern (shows matching devices + all active wipes) |
|
|
161
201
|
| **ESC** | clear filter | Clear the filter and jump to top of list |
|
|
162
|
-
| **
|
|
202
|
+
| **ESC** | back | Return to previous screen if on nested screen |
|
|
203
|
+
| **m** | mode | Cycle auto verify mode: +V (verify), -V (don't) [saved as preference] |
|
|
163
204
|
| **P** | passes | Cycle wipe passes: 1, 2, or 4 (saved as preference) |
|
|
164
205
|
| **V** | verify % | Cycle verification percentage: 0%, 2%, 5%, 10%, 25%, 50%, 100% (saved as preference) |
|
|
165
|
-
| **c** | confirmation | Cycle confirmation mode: Y, y, YES, yes, device name (saved as preference) |
|
|
166
|
-
| **d** | dirty limit | Cycle dirty page limit: 0, 500, 1000, 2000, 4000 MB (saved as preference) |
|
|
167
206
|
| **D** | dense | Toggle dense/spaced view (saved as preference) |
|
|
168
207
|
| **t** | themes | Open theme preview screen to view and change color themes |
|
|
169
208
|
|
|
170
|
-
### Wipe
|
|
209
|
+
### Wipe Types
|
|
171
210
|
|
|
172
|
-
`dwipe` supports
|
|
211
|
+
`dwipe` supports several wipe modes.
|
|
173
212
|
|
|
174
213
|
- **Zero** - Fills the device with zeros (multi-pass alternates random/zero patterns, ending on zeros)
|
|
175
|
-
- **Zero+V** - Same as Zero, but automatically verifies after wipe completes (if verify % > 0)
|
|
176
214
|
- **Rand** - Fills the device with random data (multi-pass alternates zero/random patterns, ending on random)
|
|
177
|
-
- **
|
|
215
|
+
- **Firmware wipes** - TBD
|
|
178
216
|
|
|
179
217
|
The `+V` suffix indicates automatic verification after wipe completion. Without `+V`, you can still manually verify by pressing **v** on a wiped device.
|
|
180
218
|
|
|
181
|
-
> **Note:** Multi-pass wipes (2 or 4 passes) alternate between zero and random patterns to ensure different bit patterns physically overwrite the disk, ending on your selected mode.
|
|
219
|
+
> **Note:** Multi-pass sofware (Zero and Rand) wipes (2 or 4 passes) alternate between zero and random patterns to ensure different bit patterns physically overwrite the disk, ending on your selected mode.
|
|
182
220
|
|
|
183
221
|
### Resuming Stopped Wipes
|
|
184
222
|
|
|
185
|
-
Stopped wipes (state **s**) can be resumed by pressing **w** on the device
|
|
223
|
+
Stopped wipes (state **s**) can be resumed by pressing **w** on the device. Choose the same type of wipe or it will start over at 0% complete.
|
|
186
224
|
|
|
187
225
|
**How Resume Works:**
|
|
188
226
|
- Preserves the original wipe mode (Rand or Zero) from when the wipe was started
|
|
189
227
|
- Uses the **current** passes setting to determine how much more to write
|
|
190
|
-
- Continues from the exact byte offset where it stopped (rounded to buffer boundary)
|
|
191
|
-
- Smart validation ensures interrupted wipes resume with correct pattern integrity
|
|
228
|
+
- Continues from the exact byte offset where it marked that stopped (rounded to buffer boundary). "Marks" are written about every 30s so for non-gracefully ended wipes, the position may be as much as 30s (or somewhat more) from the last wiped disk blocks.
|
|
192
229
|
|
|
193
230
|
**Resume Examples:**
|
|
194
231
|
|
|
@@ -243,7 +280,7 @@ Stopped wipes (state **s**) can be resumed by pressing **w** on the device:
|
|
|
243
280
|
|
|
244
281
|
### Progress Information
|
|
245
282
|
|
|
246
|
-
When wiping a device, `dwipe` displays:
|
|
283
|
+
When software wiping a device, `dwipe` displays:
|
|
247
284
|
- **Elapsed time** - Time since wipe started (e.g., 1m18s)
|
|
248
285
|
- **Remaining time** - Estimated time to completion (e.g., -3m6s)
|
|
249
286
|
- **Write rate** - Current throughput (e.g., "45.2MB/s")
|
|
@@ -301,7 +338,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
301
338
|
|
|
302
339
|
## Security Considerations
|
|
303
340
|
|
|
304
|
-
**Important limitations:**
|
|
341
|
+
**Important limitations of software wipes:**
|
|
305
342
|
|
|
306
343
|
- `dwipe` supports multi-pass wiping with alternating patterns, but does not implement specific DoD 5220.22-M or Gutmann certified pattern sequences
|
|
307
344
|
- More than adequate for **personal and business data** that doesn't require (antiquated) certified destruction
|
|
@@ -314,8 +351,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
314
351
|
|
|
315
352
|
**Best practices:**
|
|
316
353
|
- Verify device labels and sizes carefully before wiping
|
|
317
|
-
- Use the **
|
|
318
|
-
- Test with `--dry-run` first if unsure
|
|
354
|
+
- Use the **Block** feature to protect critical disks
|
|
319
355
|
- Consider encryption for sensitive data as the primary security measure
|
|
320
356
|
|
|
321
357
|
---
|
|
@@ -334,7 +370,7 @@ Press **ESC** from the main screen to clear the filter and return to showing all
|
|
|
334
370
|
### Wipe issues
|
|
335
371
|
- **Can't wipe a device** - Check the STATE column:
|
|
336
372
|
- **Mnt** - Unmount the partition first: `sudo umount /dev/sdXN`
|
|
337
|
-
- **
|
|
373
|
+
- **Blk** - Press **b** to unblock
|
|
338
374
|
- **Busy** - Another partition on the disk is being wiped
|
|
339
375
|
- **Wipe is very slow** - Normal for large drives; check write rate to verify progress
|
|
340
376
|
- **Wipe seems stuck** - Most likely due to bad disks; Direct I/O makes progress almost constant on good disks.
|