1 .\" Copyright 2009 by Karel Zak. All Rights Reserved.
2 .\" This file may be copied under the terms of the GNU Public License.
4 .TH WIPEFS 8 "December 2014" "util-linux" "System Administration"
6 wipefs \- wipe a signature from a device
15 can erase filesystem, raid or partition-table signatures (magic strings) from
18 to make the signatures invisible for libblkid.
21 does not erase the filesystem itself nor any other data from the device.
22 When used without any options, \fBwipefs\fR lists all visible filesystems
23 and the offsets of their basic signatures.
26 calls the BLKRRPART ioctl when it has erased a partition-table signature
27 to inform the kernel about the change.
29 Note that some filesystems and some partition tables store more magic strings on
32 command lists only the first offset where a magic string has been detected. The device
33 is not scanned for additional magic strings for the same filesystem. It is possible
34 that after a \fBwipefs -o \fIoffset\fR the same filesystem or partition
35 table will still be visible because of another magic string on another offset. The
36 option \fB\-\-no\-act\fR is also affected by this behavior and only the first
37 magic string for the filesystem is reported.
39 When option \fB-a\fR is used, all magic strings that are visible for libblkid are
40 erased. In this case the
42 scans the device again after each modification (erase) until no magic string is found.
46 does not erase nested partition tables on non-whole disk devices.
47 For this the option \fB\-\-force\fR is required.
52 Erase all available signatures. The set of erased signatures can be
53 restricted with the \fB\-t\fR option.
55 .BR \-b , " \-\-backup"
56 Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak.
57 For more details see the \fBEXAMPLES\fR section.
59 .BR \-f , " \-\-force"
60 Force erasure, even if the filesystem is mounted. This is required in
61 order to erase a partition-table signature on a block device.
64 Display help text and exit.
66 .BR -n , " \-\-no\-act"
67 Causes everything to be done except for the write() call.
69 .BR \-o , " \-\-offset " \fIoffset\fP
70 Specify the location (in bytes) of the signature which should be erased from the
71 device. The \fIoffset\fR number may include a "0x" prefix; then the number will be
72 interpreted as a hex value. It is possible to specify multiple \fB-o\fR options.
74 The \fIoffset\fR argument may be followed by the multiplicative
75 suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
76 (the "iB" is optional, e.g. "K" has the same meaning as "KiB"), or the suffixes
77 KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
79 .BR \-p , " \-\-parsable"
80 Print out in parsable instead of printable format. Encode all potentially unsafe
81 characters of a string to the corresponding hex value prefixed by '\\x'.
83 .BR \-q , " \-\-quiet"
84 Suppress any messages after a successful signature wipe.
86 .BR \-t , " \-\-types " \fIlist\fP
87 Limit the set of printed or erased signatures. More than one type may
88 be specified in a comma-separated list. The list or individual types
89 can be prefixed with 'no' to specify the types on which no action should be
90 taken. For more details see mount(8).
92 .BR -V , " \-\-version"
93 Display version information and exit.
96 .BR "wipefs --all --backup /dev/sdb"
97 Erases all signatures from the device /dev/sdb and creates a signature backup
98 file ~/wipefs-sdb-<offset>.bak for each signature.
100 .BR "dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc"
101 Restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.
103 Karel Zak <kzak@redhat.com>
105 .IP LIBBLKID_DEBUG=all
106 enables libblkid debug output.
111 The wipefs command is part of the util-linux package and is available from
112 https://www.kernel.org/pub/linux/utils/util-linux/.