wipefs can erase filesystem, raid or partition-table signatures
(magic strings) from the specified device to make the signatures
invisible for libblkid.
wipefs does not erase the filesystem itself nor any other data from
the device. When used without any options, wipefs lists all visible
filesystems and the offsets of their basic signatures.
wipefs calls the BLKRRPART ioctl when it has erased a partition-table
signature to inform the kernel about the change.
Note that some filesystems and some partition tables store more magic
strings on the device. The wipefs command lists only the first
offset where a magic string has been detected. The device is not
scanned for additional magic strings for the same filesystem. It is
possible that after a wipefs -o offset the same filesystem or
partition table will still be visible because of another magic string
on another offset.
When option -a is used, all magic strings that are visible for
libblkid are erased.
Note that by default wipefs does not erase nested partition tables on
non-whole disk devices. For this the option --force is required.
Erase all available signatures. The set of erased signatures
can be restricted with the -t option.
Create a signature backup to the file
$HOME/wipefs-<devname>-<offset>.bak. For more details see the
Force erasure, even if the filesystem is mounted. This is
required in order to erase a partition-table signature on a
Display help text and exit.
Causes everything to be done except for the write() call.
-o, --offset offset
Specify the location (in bytes) of the signature which should
be erased from the device. The offset number may include a
"0x" prefix; then the number will be interpreted as a hex
value. It is possible to specify multiple -o options.
The offset argument may be followed by the multiplicative
suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB,
TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g. "K" has
the same meaning as "KiB"), or the suffixes KB (=1000), MB
(=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
Print out in parsable instead of printable format. Encode all
potentially unsafe characters of a string to the corresponding
hex value prefixed by '\x'.
Suppress any messages after a successful signature wipe.
-t, --types list
Limit the set of printed or erased signatures. More than one
type may be specified in a comma-separated list. The list or
individual types can be prefixed with 'no' to specify the
types on which no action should be taken. For more details
Display version information and exit.
wipefs --all --backup /dev/sdb
Erases all signatures from the device /dev/sdb and creates a
signature backup file ~/wipefs-sdb-<offset>.bak for each
dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438))bs=1 conv=notrunc
Restores an ext2 signature from the backup file ~/wipefs-
This page is part of the util-linux (a random collection of Linux
utilities) project. Information about the project can be found at
⟨https://www.kernel.org/pub/linux/utils/util-linux/⟩. If you have a
bug report for this manual page, send it to
email@example.com. This page was obtained from the
project's upstream Git repository
2017-03-13. If you discover any rendering problems in this HTML ver‐
sion of the page, or you believe there is a better or more up-to-date
source for the page, or you have corrections or improvements to the
information in this COLOPHON (which is not part of the original man‐
ual page), send a mail to firstname.lastname@example.org
util-linux December 2014 WIPEFS(8)