ADVANCED TOPIC
For power users & technical workflows. Beginners can safely stick to the standard defaults—or dive in if you want to explore more of what ShredOS can do.

Persistent Default Options via the Kernel Command Line

If you want nwipe and ShredOS to launch with specific settings automatically every time ShredOS boots, such as pre-selecting a wipe method, disabling verification, transferring PDFs, logs, nwipe.conf over a network, or powering off automatically upon completion, you can pass these options directly through the Linux kernel command line in your GRUB configuration files.

Where to Make the Changes

To ensure your custom defaults apply regardless of whether the target machine boots in legacy BIOS mode or UEFI mode, you should update both of the following configuration files on your ShredOS USB drive:

  • /boot/grub/grub.cfg (Used for Legacy BIOS booting)
  • /EFI/BOOT/grub.cfg (Used for UEFI booting)

Understanding the Modern grub.cfg Structure

Recent versions of ShredOS include multiple boot entries in grub.cfg, including a fallback graphics option (nomodeset) and several Memtest86+ diagnostic entries.

Below is what a standard, unmodified grub.cfg looks like:

set default="0"
set timeout="15"

menuentry "ShredOS" {
    linux /boot/bzImage console=tty3 loglevel=3
}

menuentry "ShredOS (nomodeset - display issues? try this)" {
    linux /boot/bzImage console=tty3 loglevel=3 nomodeset
}

if [ "${grub_platform}" = "efi" ]; then
   menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" {
    linux /EFI/BOOT/memtest.efi keyboard=legacy
}
   menuentry "Memtest86+ (USB keyboards)" {
    linux /EFI/BOOT/memtest.efi keyboard=both
}
   menuentry "Memtest86+ (Disable SMP and memory identification)" {
    linux /EFI/BOOT/memtest.efi nosmp nosm nobench
}
fi

if [ "${grub_platform}" = "pc" ]; then
   menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" {
    linux /boot/memtest keyboard=legacy
}
   menuentry "Memtest86+ (USB keyboards)" {
    linux /boot/memtest keyboard=both
}
   menuentry "Memtest86+ (Disable SMP and memory identification)" {
    linux /boot/memtest nosmp nosm nobench
}
  menuentry "Memtest86+ (Serial line RS232, ttyS0,115200)" {
    linux /boot/memtest console=ttyS0,115200
}
fi

Which lines should you edit?

  • Do not add nwipe_options or ShredOS parameters to the Memtest86+ entries, as those are standalone memory diagnostic tools and do not boot ShredOS.
  • Primary Entry (ShredOS): This is the default entry (set default="0") that boots automatically after the 15-second timeout. You will definitely want to add your options here.
  • Fallback Entry (ShredOS (nomodeset...)): You may optionally add the same options to this entry as well, in case you ever need to manually select it on hardware with display compatibility issues.

(Optional Tip: If you are setting up an automated wiping station, you can also change set timeout="15" to set timeout="0" or "3" so ShredOS boots immediately without waiting.)


Configuring nwipe_options

To pass arguments directly to nwipe, append nwipe_options="..." to the linux /boot/bzImage line inside your chosen menuentry. All nwipe flags must be enclosed within double quotes.

Example 1: Setting Default Wipe Behaviour

In this example, nwipe is configured to start up using the zero fill method, skip verification, skip blanking, ignore USB devices (to prevent accidentally wiping the ShredOS boot drive), and automatically power off the system once the wipe completes:

menuentry "ShredOS" {
    linux /boot/bzImage console=tty3 loglevel=3 nwipe_options="--method=zero --verify=off --noblank --nousb --autopoweroff"
}

menuentry "ShredOS (nomodeset - display issues? try this)" {
    linux /boot/bzImage console=tty3 loglevel=3 nomodeset nwipe_options="--method=zero --verify=off --noblank --nousb --autopoweroff"
}

Note on --autopoweroff: When --autopoweroff is included inside nwipe_options, ShredOS automatically intercepts it and converts it to --nowait. This prevents nwipe from shutting down the machine before ShredOS has had a chance to save your PDF erasure certificates and logs to the USB drive or remote server. If a network transfer fails, ShredOS pauses shutdown so you can review transfer.log or archive the certificates to a USB stick.

Example 2: Specifying Target Devices

You are not limited to standard flags; you can also pre-select specific block devices to wipe. Just like running nwipe directly from a terminal, list the target device paths at the end of the nwipe_options string, after all flags:

menuentry "ShredOS" {
    linux /boot/bzImage console=tty3 loglevel=3 nwipe_options="--method=zero --verify=off --noblank --nousb --autopoweroff /dev/sdd /dev/sde"
}

Warning: Be extremely cautious when hardcoding device paths like /dev/sdd or /dev/sde into grub.cfg, especially if combining them with --autonuke or --autopoweroff. Linux device enumeration can occasionally shift across different hardware configurations or reboots, which could result in wiping an unintended drive.

(Developer Tip: If you specify contiguous loopback devices such as /dev/loop0 /dev/loop1 in nwipe_options, ShredOS automatically creates alternating 1 MB and 500 KB loopback images for safe testing.)


Configuring ShredOS Parameters

In addition to nwipe_options="...", ShredOS supports several standalone kernel command line parameters that control keyboard layout, boot drive exclusion, pre/post-wipe hook scripts, and network transfers over FTP, TFTP, or HTTP. These parameters sit outside the nwipe_options quotes on the linux /boot/bzImage line.

  • loadkeys (loadkeys=uk) Sets the console keyboard layout before nwipe starts (e.g., uk, de, fr, es).
  • shredos_exclude_boot_disc (shredos_exclude_boot_disc="yes") Excludes the ShredOS boot drive from nwipe’s device list and --autonuke (equivalent to placing /exclude_disc.txt on the boot drive).
  • shredos_autoreboot (shredos_autoreboot="enable") Automatically reboots the system once nwipe and all file transfers succeed. Automatically adds --nowait to nwipe if not already specified.
  • shredos_config (shredos_config="ftp:192.168.0.2:/data/:user:pass") Downloads nwipe.conf, nwipe_customers.csv, and logo.jpg from an ftp or tftp server before nwipe starts, and uploads updated config files, dmesg.txt, and transfer.log upon exit.
  • shredos_output (shredos_output="ftp:192.168.0.2:/logs/:user:pass") Uploads generated PDF erasure certificates (*.pdf) and logs (nwipe_log*.txt) to an ftp or tftp server after nwipe exits instead of saving to USB.
  • shredos_pre_wipe (shredos_pre_wipe="http://192.168.0.2/pre.sh --arg1") Downloads a shell script via wget to /tmp/pre_wipe.sh and runs it with any specified arguments before nwipe starts. If the download fails, nwipe will not launch.
  • shredos_post_wipe (shredos_post_wipe="http://192.168.0.2/post.sh --arg1") Downloads a shell script via wget to /tmp/post_wipe.sh before nwipe starts and runs it after nwipe and log transfers complete.
  • lftp (lftp="open 192.168.1.60; user joe pass; mput nwipe_*.txt") Runs custom lftp -c commands after nwipe completes and moves transferred logs to /exported/.
  • http_post_url (http_post_url="http://192.168.0.2/upload") Uploads the completed nwipe text log file via an HTTP PUT request using wget and moves it to /exported/.

Formatting shredos_config and shredos_output

Both shredos_config and shredos_output use six colon-delimited fields:

protocol:IP_address:path:username:password:debug
  • protocol: ftp or tftp.
  • IP_address: IPv4 address of the remote server (ShredOS waits up to 30 seconds for a ping response before proceeding).
  • path: Remote directory path (leave blank between colons to use the server’s default directory).
  • username: Account username. Use no user if authentication is not required, or leave blank (::) to be prompted interactively at boot.
  • password: Account password. Use no password if authentication is not required, or leave blank (::) to be prompted interactively at boot.
  • debug: Optional trailing d to enable verbose lftp debug logging in /transfer.log (leave blank for normal operation).

(Note: When using tftp, the server must permit file creation and write access from clients, such as TFTP_OPTIONS="--secure -v -c" in tftpd-hpa.)

Example 3: Standalone USB Station with UK Keyboard and Boot Drive Protection

menuentry "ShredOS" {
    linux /boot/bzImage console=tty3 loglevel=3 loadkeys=uk shredos_exclude_boot_disc="yes" nwipe_options="--method=zero --verify=off --noblank --autopoweroff"
}

Example 4: Automated Networked Station (PXE / FTP)

In this example, ShredOS pulls its configuration and custom PDF logo from an FTP server, runs an unattended wipe across all non-USB drives, uploads the PDF certificates and logs back to the server without authentication prompts, and reboots:

menuentry "ShredOS" {
    linux /boot/bzImage console=tty3 loglevel=3 shredos_config="ftp:192.168.0.2:/shredos/cfg/:no user:no password:" shredos_output="ftp:192.168.0.2:/shredos/logs/:no user:no password:d" shredos_autoreboot="enable" nwipe_options="--autonuke --method=dodshort --nousb"
}

Common nwipe Flags Reference

For a complete list of supported arguments, run nwipe --help from a ShredOS terminal (Alt + F2). Below are some of the most commonly used flags for nwipe_options, followed by the full reference output:

Flag Description
--method=<method> Sets the wipe method (e.g., zero, dodshort, dod522022m, gutmann, ops2, random, prng).
--verify=<type> Sets verification behaviour (off, last, all).
--noblank Skips the final blanking pass after a wipe.
--nousb Hides/ignores USB storage devices in nwipe.
--autonuke Use with caution: Starts wiping all eligible drives immediately without user confirmation.
--autopoweroff Shuts down the machine automatically after all wipes and log transfers have finished.
-l <file> / --logfile=<file> Writes the text log to a specific filename or path.
-P <dir> / --PDFreportpath=<dir> Writes PDF erasure certificates to a specific directory (or noPDF to disable PDF generation).

Complete nwipe Flags Reference as of nwipe v0.43

To view the available options for your version of nwipe, run nwipe --help (or sudo nwipe --help on a standard Linux system).

      --force
        Also allow wiping of devices that are considered in use (mounted).
        Beware this option is considered dangerous and is disabled by default.
        This means that by default even --autonuke will exclude any such devices.

      --autonuke
        If no devices have been specified on the command line, starts wiping
        all devices immediately. If devices have been specified, starts wiping
        only those specified devices immediately.

      --autopoweroff
        Power off system on completion of wipe delayed for one minute. During
        this one minute delay you can abort the shutdown by typing
        sudo shutdown -c

      --sync=NUM
        Will perform a sync after NUM writes (default: 100000)
        0 - fdatasync after the disk is completely written. fdatasync
        errors are not detected until completion of the wipe. 0 is not
        recommended as disk errors may cause nwipe to appear to hang
        1 - fdatasync after every write
        Warning: Lower values will reduce wipe speeds.
        1000 - fdatasync after 1000 writes etc.
        Note: Sync is not used when nwipe is operating in direct I/O mode.

      --verify=TYPE
        Whether to perform verification of erasure (default: last)
        off  - Do not verify
        last - Verify after the last pass
        all  - Verify every pass
        Be aware that HMG IS5 enhanced always verifies the last (PRNG) pass
        regardless of this option.

      --directio
        Force direct I/O (O_DIRECT); fail if not supported
        Note: nwipe\'s default I/O method is to use direct I/O

      --cachedio
        Force kernel cached I/O; never attempt O_DIRECT

      --io-mode=MODE
        I/O mode: auto (default), direct, cached

  -m, --method=METHOD
        The wiping method. See man page for more details. (default: PRNG)
        dod522022m | dod       - 7 pass DOD 5220.22-M method
        dodshort | dod3pass    - 3 pass DOD method
        gutmann                - Peter Gutmann\'s Algorithm
        ops2                   - RCMP TSSIT OPS-II
        random | prng | stream - PRNG Stream
        zero | quick           - Overwrite with zeros
        one                    - Overwrite with ones (0xFF)
        verify_zero            - Verifies disk is zero filled
        verify_one             - Verifies disk is 0xFF filled
        is5enh                 - HMG IS5 enhanced
        bruce7                 - Schneier Bruce 7-pass mixed pattern
        bmb                    - BMB21-2019 mixed pattern

  -l, --logfile=FILE
        Filename to log to. Default is STDOUT

  -P, --PDFreportpath=PATH
        Path to write PDF reports to. Default is '.'
        If set to noPDF no PDF reports are written.

  -p, --prng=TYPE
        PRNG option:
        mersenne | twister
        isaac
        isaac64
        add_lagg_fibonacci_prng
        xoroshiro256_prng
        splitmix64
        aes_ctr_prng
        chacha20

      --prng=auto|default
        auto - Automatically benchmark all available PRNGs at startup
        and select the fastest one for the current hardware. (default=auto)
        default|manual - Disable auto-selection and use the built-in
        default PRNG choice (CPU-based heuristic; no benchmarking).

      --prng-benchmark
        Run a RAM-only PRNG throughput benchmark and exit.
        Prints a sorted leaderboard (MB/s). No wipe is performed.

      --prng-bench-seconds=N
        Seconds per PRNG during benchmarking (default: 1.0).
        For --prng=auto this is automatically reduced unless set.

  -q, --quiet
        Anonymize logs and the GUI by removing unique data, i.e. serial
        numbers, LU WWN Device ID, and SMBIOS/DMI data. XXXXXX = S/N exists,
        ????? = S/N not obtainable.

  -r, --rounds=NUM
        Number of times to wipe the device using the selected method.
        (default: 1)

      --noblank
        Do NOT blank disk after wipe.
        (default is to complete a final blank pass)

      --nowait
        Do NOT wait for a key before exiting.
        (default is to wait)

      --nosignals
        Do NOT allow signals to interrupt a wipe.
        (default is to allow)

      --nogui
        Do NOT show the GUI interface. Automatically invokes the nowait
        option. Must be used with the --autonuke option.
        Send a `kill -signal SIGUSR1 pid` to display current stats in the
        terminal.

      --nousb
        Do NOT show or wipe any USB devices whether in GUI mode, --nogui or
        --autonuke modes.

      --reverse
        Reverse the I/O direction (from the end of the device towards the start)
        Helpful when bad blocks otherwise prevent wiping major areas of the device
        Beware throughput may be degraded as it writes against the spin direction

      --scatter
        Use scattered I/O direction (random segmented order across the device)
        More mechanical exercise; good for burning-in or stress-testing devices
        Beware the throughput may be degraded due to random access patterns used

      --no-retry-on-io-errors
        Do NOT retry single failed read/write operations; immediately error
        or skip the failing block. (default is retry 3 times with 5s sleep
        in-between)

      --no-abort-on-block-errors
        Do NOT abort passes on block write errors; skip the failing block and
        continue. (default is to abort the wipe for that device)
        Beware: Faulty devices can take a very long time to wipe
        without the --no-retry-on-io-errors option, due to the many retries.

      --pdftag
        Enables a field on the PDF that holds a tag that identifies the host
        computer.

      --pdfduplex
        Enables insertion of intentionally blank pages between sections on PDFs

  -e, --exclude=DEVICES
        Up to ten comma separated devices to be excluded.
        Examples:
        --exclude=/dev/sdc
        --exclude=/dev/sdc,/dev/sdd
        --exclude=/dev/sdc,/dev/sdd,/dev/mapper/cryptswap1

        --exclude=/dev/disk/by-id/ata-XXXXXXXX
        --exclude=/dev/disk/by-path/pci-0000:00:17.0-ata-1