1WIPEFS(8) System Administration WIPEFS(8)
2
3
4
6 wipefs - wipe a signature from a device
7
9 wipefs [options] device...
10
11 wipefs [--backup] -o offset device...
12
13 wipefs [--backup] -a device...
14
16 wipefs can erase filesystem, raid or partition-table signatures (magic
17 strings) from the specified device to make the signatures invisible for
18 libblkid. wipefs does not erase the filesystem itself nor any other
19 data from the device.
20
21 When used without any options, wipefs lists all visible filesystems and
22 the offsets of their basic signatures. The default output is subject
23 to change. So whenever possible, you should avoid using default out‐
24 puts in your scripts. Always explicitly define expected columns by
25 using --output columns-list in environments where a stable output is
26 required.
27
28 wipefs calls the BLKRRPART ioctl when it has erased a partition-table
29 signature to inform the kernel about the change. The ioctl is called as
30 the last step and when all specified signatures from all specified
31 devices are already erased.
32
33 Note that some filesystems and some partition tables store more magic
34 strings on the device (e.g., FAT, ZFS, GPT). The wipefs command (since
35 v2.31) lists all the offset where a magic strings have been detected.
36
37 When option -a is used, all magic strings that are visible for libblkid
38 are erased. In this case the wipefs scans the device again after each
39 modification (erase) until no magic string is found.
40
41 Note that by default wipefs does not erase nested partition tables on
42 non-whole disk devices. For this the option --force is required.
43
44
46 -a, --all
47 Erase all available signatures. The set of erased signatures
48 can be restricted with the -t option.
49
50 -b, --backup
51 Create a signature backup to the file $HOME/wipefs-<dev‐
52 name>-<offset>.bak. For more details see the EXAMPLES section.
53
54 -f, --force
55 Force erasure, even if the filesystem is mounted. This is
56 required in order to erase a partition-table signature on a
57 block device.
58
59 -h, --help
60 Display help text and exit.
61
62 -J, --json
63 Use JSON output format.
64
65 -n, --noheadings
66 Do not print a header line.
67
68 -O, --output list
69 Specify which output columns to print. Use --help to get a list
70 of all supported columns.
71
72 -n, --no-act
73 Causes everything to be done except for the write() call.
74
75 -o, --offset offset
76 Specify the location (in bytes) of the signature which should be
77 erased from the device. The offset number may include a "0x"
78 prefix; then the number will be interpreted as a hex value. It
79 is possible to specify multiple -o options.
80
81 The offset argument may be followed by the multiplicative suf‐
82 fixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB,
83 PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the
84 same meaning as "KiB"), or the suffixes KB (=1000), MB
85 (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
86
87 -p, --parsable
88 Print out in parsable instead of printable format. Encode all
89 potentially unsafe characters of a string to the corresponding
90 hex value prefixed by '\x'.
91
92 -q, --quiet
93 Suppress any messages after a successful signature wipe.
94
95 -t, --types list
96 Limit the set of printed or erased signatures. More than one
97 type may be specified in a comma-separated list. The list or
98 individual types can be prefixed with 'no' to specify the types
99 on which no action should be taken. For more details see
100 mount(8).
101
102 -V, --version
103 Display version information and exit.
104
106 wipefs /dev/sda*
107 Prints information about sda and all partitions on sda.
108
109 wipefs --all --backup /dev/sdb
110 Erases all signatures from the device /dev/sdb and creates a
111 signature backup file ~/wipefs-sdb-<offset>.bak for each signa‐
112 ture.
113
114 dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1
115 conv=notrunc
116 Restores an ext2 signature from the backup file ~/wipefs-
117 sdb-0x00000438.bak.
118
120 Karel Zak <kzak@redhat.com>
121
123 LIBBLKID_DEBUG=all
124 enables libblkid debug output.
125
127 blkid(8), findfs(8)
128
130 The wipefs command is part of the util-linux package and is available
131 from https://www.kernel.org/pub/linux/utils/util-linux/.
132
133
134
135util-linux December 2014 WIPEFS(8)