Configuring Wipe and Clear Options in ShredOS

In everyday IT administration and data sanitization, the terms wipe and clear are often used synonymously to describe overwriting every addressable sector on a storage device so that previous files and file systems are completely erased. However, the two terms come from distinct traditions:

  • Wipe (Informal / Legacy Origin): “Wipe” is a general, colloquial term rooted in the early era of magnetic tape and floppy/hard disks, referring to the physical or logical act of “wiping clean” magnetic media by writing over old patterns. Because it is an informal industry term, “wiping” does not inherently specify how many passes are used or whether drive-managed hidden areas are addressed.

  • Clear (Formal / NIST SP 800-88 Origin): “Clear” is a formal sanitization category defined by the U.S. National Institute of Standards and Technology (NIST) in NIST Special Publication 800-88 (Guidelines for Media Sanitization). NIST defines Clear as applying logical techniques to sanitize data in all user-addressable storage locations using standard read and write commands (such as overwriting with zeros or a PRNG stream) to protect against simple, non-invasive data recovery techniques.

    This differs from Purge, which uses lower-level firmware commands (such as NVMe Sanitize, NVMe Format NVM, or ATA Secure Erase) to also sanitize drive-managed, non-host-accessible physical media depending on the drive’s architecture:

    • SSDs and NVMe Drives: Over-provisioned (OP) NAND space, retired/bad erase blocks, and unmapped flash pages managed by the Flash Translation Layer (FTL). (Note: NVMe drives do not use ATA features like HPA or DCO.)

    • Modern and Legacy ATA/SATA HDDs: Reallocated bad sectors and hidden capacity regions configured via modern Accessible Max Address Configuration (AMAC) or legacy Host Protected Areas (HPA) and Device Configuration Overlays (DCO) on older drives.

    • Enterprise SAS/SCSI HDDs: Reallocated sectors in the grown defect list (G-list) and capacity truncated via SCSI mode pages.

Quick Start: Selecting Drives & Using Defaults

Use the drive selection screen to choose which disks to wipe and configure your erasure settings. If you are unsure which settings to pick, leave the defaults as they are, as these work well for modern SATA, IDE, and SAS drives (post-2000, non-MFM). SSDs and NVMe drives are covered separately, as they have specific requirements that must be addressed before running a traditional block erasure. Preferably, use a hardware sanitize (purge) method in ShredOS/nwipe on SSD and NVMe drives, as detailed in Hardware Sanitize.

Enabling a specific drive is achieved by using the ↑ and ↓ arrow keys and then pressing Space to enable the drive for wiping. >[wipe] will be displayed at the start of the drive line, indicating that this specific drive will be wiped upon starting the job with Shift+S (capital S). If the drive supports native sanitize and you wish to sanitize (purge) the drive, use the up/down arrow keys to highlight the drive and then press → (the right arrow key). As of nwipe v0.43, only one drive can be sanitized at a time, unlike traditional block writing where multiple drives can be simultaneously erased.

  • >[wipe] = Drive will be wiped.
  • >[    ] = Drive will not be wiped.
  • >[----] = Drive is mounted and cannot be selected for wiping.

Drives currently mounted by the operating system are flagged as [IN USE] and cannot be wiped until unmounted. This safeguard prevents accidentally overwriting a mounted drive when nwipe is run on a standard Linux distribution. You will not normally see this warning in ShredOS, as it operates in RAM as a diskless system with no drives mounted at boot. If you are running nwipe on a Linux distro, you can override this prevention measure using the --force option (e.g., sudo ./nwipe --force).

Drive selection showing status indicators and option hotkeys (`M`, `P`, `V`, `R`, `B`, `D`)

1. Wipe Method (M)

Pressing M opens the Wipe Method selection menu. This determines the specific pattern of data written to every addressable sector on your drive.

`nwipe` Wipe Method selection screen

Why PRNG Stream is the Default

ShredOS defaults to a PRNG (Pseudo-Random Number Generator) Stream.

  • Thorough Hardware Testing: Unlike writing a static stream of zeros, a PRNG stream writes a constantly shifting, high-entropy pattern of 1s and 0s. This stresses the drive’s read/write heads, internal cache, and data channels more thoroughly, making it an excellent diagnostic burn-in test to reveal failing sectors or controller issues during the wipe.

  • Data Sanitization: It leaves the drive filled with random noise, completely obscuring any previous data structures or file signatures.

Modern Drives vs. Single-Pass Zeros

On modern hard disk drives (HDDs) utilizing Perpendicular Magnetic Recording (PMR) or Shingled Magnetic Recording (SMR), even a single-pass Zero Fill (Ops2 / Zero) is almost certainly unrecoverable.

Modern drives pack magnetic domains so densely, and rely on complex Partial Response Maximum Likelihood (PRML) read channels and error-correcting codes (ECC), that once a magnetic domain is flipped to zero, residual analog magnetic traces (“shadow data”) cannot be read back, even in a specialized forensic laboratory using Magnetic Force Microscopy (MFM). This aligns with modern standards such as NIST SP 800-88 Rev. 1, which recognizes a single overwrite pass as sufficient for standard Clear sanitization on modern magnetic media.

Why Multi-Pass Methods Existed (The MFM Era)

You will notice several multi-pass algorithms in the menu, such as DoD 5220.22-M (7-pass), DoD Short (3-pass), and the Gutmann Method (35-pass).

  • Historical Context: These methods were designed in the 1980s and early 1990s (specifically formalized in Peter Gutmann’s 1996 paper) to target older MFM (Modified Frequency Modulation) and RLL (Run-Length Limited) drives (circa 1980 to 1990).

  • Why Multiple Passes Were Needed: Those legacy drives had much wider tracks, lower areal density, and imprecise stepper-motor head positioning. When a head wrote over old data, slight alignment offsets left readable magnetic fringes along the edges of the track. Multi-pass algorithms wrote specific alternating bit patterns to saturate the magnetic medium and erase those edge traces. On modern drives, 35 passes do not provide extra security; they simply take 35 times longer and cause unnecessary mechanical wear.

Regulatory and Compliance Requirements

Despite modern physics making single-pass wipes sufficient, many organizations, government contractors, and enterprise clients still operate under legacy compliance policies, insurance mandates, or strict internal SOPs that explicitly require DoD 5220.22-M or HMG IS5 certifications. Selecting the matching method in ShredOS ensures your generated PDF erasure certificate satisfies your auditor’s exact checklist.

(Note: For SSDs and NVMe drives, block-level overwriting (Clear) cannot reach over-provisioned or retired flash blocks due to wear leveling. Refer to the Hardware Sanitize documentation for solid-state media.)

2. Pseudorandom Number Generator / PRNG (P)

If you select a wipe method that writes random data (such as PRNG Stream or DoD), pressing P opens the PRNG selection menu. In nwipe, PRNGs are organized into two distinct categories depending on whether you prioritize raw throughput or cryptographic compliance.

`nwipe` Pseudorandom Number Generator menu showing General Purpose vs. Secure/Auditable PRNGs

Automatic Hardware Optimization (o)

Notice the prompt at the bottom of the PRNG menus: Press 'o' for the fastest PRNG for your hardware!

When you press o (or when nwipe initializes its default configuration), nwipe inspects your processor’s architecture (e.g., 32-bit vs. 64-bit), checks CPU instruction set capabilities (such as AES-NI hardware encryption instructions or AVX/SIMD vector extensions via the Linux kernel CryptoAPI), and runs a quick internal throughput benchmark across the available generators. It then automatically selects the fastest PRNG that your specific CPU can execute without bottlenecking modern high-speed SATA, SAS, or NVMe drives.

Category A: General Purpose PRNGs

General Purpose PRNGs favor maximum speed over cryptographic security. While they are mathematically well-tested algorithms that produce high-entropy statistical randomness ideal for data wiping and drive testing, they are not designed to resist cryptographic state-prediction attacks.

`nwipe` General Purpose PRNGs submenu

  • Mersenne Twister: A widely used, statistically robust PRNG with a massive period ($2^{19937}-1$). Reliable across almost all hardware, though slightly slower than newer 64-bit generators.

  • Lagged Fibonacci (ALFG): An Additive Lagged Fibonacci Generator that uses minimal CPU arithmetic, making it lightweight and effective on older or low-power processors.

  • XORoshiro-256: A modern, ultra-fast 64-bit shift-register generator by Blackman and Vigna. It requires very few CPU cycles per byte, making it ideal for wiping multiple high-speed drives simultaneously.

  • SplitMix64: A fast non-cryptographic 64-bit PRNG (by Steele and Lea, adapted by Sebastiano Vigna) utilizing 64-bit arithmetic and bit shifts. It is heavily optimized for high-speed data generation on modern 64-bit CPU architectures.

Category B: Secure / Auditable PRNGs (CSPRNGs)

Cryptographically Secure Pseudorandom Number Generators (CSPRNGs) ensure that the generated bit stream is computationally indistinguishable from true random noise. These are recommended when strict data security policies or compliance audits require cryptographic-grade erasure patterns.

`nwipe` Secure/Auditable PRNGs submenu

  • AES-256-CTR (CSPRNG): Runs AES-256 in Counter Mode via the Linux kernel’s AF_ALG cryptographic API. Compliant with NIST SP 800-38A, it leverages hardware acceleration (AES-NI) on modern x86_64 processors, allowing it to achieve both cryptographic auditability and blistering multi-gigabyte-per-second speeds.

  • ChaCha20 (CSPRNG): A modern, high-speed cryptographic stream cipher designed by Daniel J. Bernstein. It provides top-tier cryptographic security and excellent performance in software, especially on CPUs without dedicated AES-NI hardware acceleration (such as certain ARM boards or older x86 chips).

  • ISAAC (CSPRNG): (Indirection, Shift, Accumulate, Add, and Count) A well-established 32-bit cryptographically secure PRNG designed for fast, unbiased random stream generation without needing kernel crypto APIs.

  • ISAAC-64 (CSPRNG): The 64-bit variant of ISAAC, engineered to take full advantage of 64-bit CPU registers for roughly double the throughput on 64-bit systems.

3. Verification (V)

Pressing V toggles how nwipe verifies that the wipe pattern was actually written to the disk. Verification is critical for catching silent write failures, bad sectors, or drives that drop offline mid-wipe.

`nwipe` Verification selection menu

  • Verify Off: Performs no read-back checks. Fastest option, but offers no guarantee that the drive actually committed the data to the platters.

  • Verify Last Pass (Default): Reads back the entire drive after the final overwrite pass completes to confirm the written pattern matches what was sent. Strongly recommended for auditing and certificates.

  • Verify All Passes: Reads back the entire drive after every single pass. Only recommended if you are explicitly troubleshooting drive reliability or required by strict policy, as it doubles the total runtime.

4. Rounds (R)

Pressing R allows you to set the number of times the selected wipe method is repeated.

`nwipe` Rounds selection menu

  • Default (1): Executes your chosen method once (e.g., 1 round of DoD 3-pass equals 3 total passes).

  • Multiple Rounds: Increasing this number multiplies the entire method. For example, setting a single-pass PRNG wipe to 2 rounds will repeat the selected method twice.

5. Blank (B)

Pressing B toggles a final blanking pass (writing 0x00 zeros across the entire drive) after your selected wipe method and rounds have finished.

`nwipe` Blanking selection menu

  • Why Use It: If you wipe a drive with a PRNG stream, the drive looks like random noise to partition tools. Enabling Blank ensures the drive is left completely zeroed out, matching the state of a factory-fresh disk, while still having benefited from the thorough PRNG channel testing beforehand.

  • (Note: If your chosen wipe method already ends with a zero pass, such as DoD 5220.22-M, an extra blanking pass is redundant.)

6. Direction (D)

Pressing D changes the logical order in which sectors are addressed during the wipe.

`nwipe` Direction selection menu

  • Forward (Default): Starts at Logical Block Address (LBA) 0 (the outer edge of spinning platters, where transfer speeds are fastest) and moves sequentially to the final sector.

  • Reverse: Starts at the highest LBA and works backward toward LBA 0. Useful for quickly overwriting backup partition tables (like the secondary GPT header at the end of a disk) or testing how a failing drive behaves when seeking in reverse.

  • Random: Overwrites blocks across the entire drive in a non-sequential, pseudo-random order while ensuring every single block is still wiped once per pass. On mechanical hard drives, this forces the actuator arm to seek constantly across the platters, making it an intensive mechanical stress test for the drive’s head positioning hardware, though it will run significantly slower than sequential directions due to seek latency.

7. Starting the Wipe (Shift + S)

Once you have selected your target drives (marked with >[wipe]) and are happy with either the default settings or your customized options, press Shift + S (capital S) to begin the traditional block I/O wipe (Clear).

  • Case-sensitive confirmation: Requiring a capital S prevents accidental erasure from a stray lowercase keypress while navigating the menu.
  • Pre-flight check: Before pressing Shift + S, double-check the selected drive models, serial numbers, and capacities on the drive selection screen, as all existing data on the selected disks will be permanently overwritten once the process begins and cannot be recovered.

8. Upon Completion of the Wipe

Once all selected drives have finished wiping, nwipe will stop updating the progress bars and display a final summary status for each disk, indicating whether the erasure succeeded or failed due to hardware errors.

Before shutting down or removing the drives, carefully inspect the Errors and Retries counters reported on the completion screen:

  • Clean Completion (0 Errors, 0 Retries): Every logical block on the drive was written (and verified, if enabled) without issue. The drive’s media and interface are healthy, and the erasure is complete.
  • Retries (> 0 Retries, 0 Errors): A retry occurs when the kernel or drive controller encounters a temporary read/write hiccup (such as a loose cable, transient bus reset, or a weak sector that required multiple attempts before succeeding). While a small number of retries with zero final errors means all blocks were eventually overwritten, it is an early warning sign of a degrading cable, power connection, or failing disk surface.
  • Errors (> 0 Errors): An error indicates that nwipe was unable to write to or verify one or more sectors on the drive (commonly caused by bad blocks, media exhaustion, or a drive dropping offline mid-wipe). If a drive reports any errors, its data has not been completely erased. Sensitive data may still reside in the unreadable or unreached sectors. A drive that fails with errors should not be trusted for reuse and should be physically destroyed (such as shredding or crushing) if it held confidential data.

Do not power off the system at this stage. No PDF erasure certificates have been created yet. Look at the status bar at the bottom of the screen, which will display "Press return to create the PDF documents".

Pressing Return (Enter) generates the PDF certificates and, provided a writable USB drive is plugged in (such as your ShredOS boot drive), automatically saves the following files to it:

  • PDF erasure certificates
  • nwipe session log files
  • Kernel dmesg diagnostic data
  • nwipe.conf and nwipe_customers.csv configuration files

If you have preconfigured nwipe / ShredOS to upload erasure certificates and logs to a remote server, pressing Return (Enter) will also trigger that upload automatically.

Note: If PDF certificate generation has been disabled in nwipe (for example, via the configuration menu or in nwipe.conf), nwipe will skip creating any PDF reports. However, you should still press Return (Enter) to exit cleanly so that your nwipe session log, dmesg output, and configuration files are flushed to the writable USB drive (and uploaded to your server, if configured) before powering off.