

#LINUX WIPEFS MANUAL#
Please do see the manual "man" page for the wipefs command. However, for you, consider "scrub" above. To answer your immediate question of securely wiping a partition, please see this Red Hat link discussing the use of "scrub" DISCLAIMER SEE Jamie Bainbridge's post below.įor generic non-secure wiping of a partition, wipefs would be an option. It's worth double if not triple-checking this just to make sure.

Strings) from the specified device to make the signatures invisible for SYNOPSIS ¶ wipefs device.I'll mention it twice here, please make absolutely certain you really target the proper disk to be scrubbed. When used without any options, wipefs lists all Wipefs does not erase the filesystem itself nor any otherĭata from the device. wipefs -all -backup /dev/sdb Erases all signatures from the device /dev/sdb and creates a signature backup file /wipefs-sdb. Visible filesystems and the offsets of their basic signatures. Wipefs calls the BLKRRPART ioctl when it has erased a dd if/wipefs-sdb-0x00000438.bak of/dev/sdb seek((0x00000438)) bs1 convnotrunc Restores ext2 signature from the backup file /wipefs-sdb-0x00000438.bak. Note that some filesystems and some partition tables store more Partition-table signature to inform the kernel about the change. Offset where a magic string has been detected. It is possible that afterĪ wipefs -o offset the same filesystem or partition table will The device is not scanned forĪdditional magic strings for the same filesystem. Note that by default wipefs does not erase nested partition When option -a is used, all magic strings that are visible Still be visible because of another magic string on another offset. b, -backup Create a signature backup to the file OPTIONS ¶ -a, -all Erase all available signatures. For more details see theĮXAMPLES section. f, -force Force erasure, even if the filesystem is mounted. Order to erase a partition-table signature on a block device. n, -no-act Causes everything to be done except for the write() call. modprobe brd rdnr1 rdsize67108864 dmsetup removeall wipefs -a -force /dev/ram0 mkfs -t. o, -offset offset Specify the location (in bytes) of the signature which should be erasedįrom the device. Multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for The offset argument may be followed by the Prefix then the number will be interpreted as a hex value. "K" has the same meaning as "KiB"), or the suffixes GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g. P, -parsable Print out in parsable instead of printable format. Unsafe characters of a string to the corresponding hex value prefixed by Q, -quiet Suppress any messages after a successful signature wipe. Prefixed with 'no' to specify the types on which no action should be t, -types list Limit the set of printed or erased signatures. V, -version Display version information and exit. EXAMPLES ¶ wipefs -all -backup /dev/sdb Erases all signatures from the device /dev/sdb and creates a signatureīackup file ~/wipefs-sdb-.bak for each signature. Dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1Ĭonv=notrunc Restores an ext2 signature from the backup fileĮNVIRONMENT ¶ LIBBLKID_DEBUG=all enables libblkid debug output.
