1WIPEFS(8)                    System Administration                   WIPEFS(8)
2
3
4

NAME

6       wipefs - wipe a signature from a device
7

SYNOPSIS

9       wipefs [options] device...
10
11       wipefs [--backup] -o offset device...
12
13       wipefs [--backup] -a device...
14

DESCRIPTION

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.
30
31       Note that some filesystems and some partition tables store  more  magic
32       strings  on the device (e.g. FAT, ZFS, GPT).  The wipefs command (since
33       v2.31) lists all the offset where a magic strings have been detected.
34
35       When option -a is used, all magic strings that are visible for libblkid
36       are  erased.  In this case the wipefs scans the device again after each
37       modification (erase) until no magic string is found.
38
39       Note that by default wipefs does not erase nested partition  tables  on
40       non-whole disk devices.  For this the option --force is required.
41
42

OPTIONS

44       -a, --all
45              Erase  all  available  signatures.  The set of erased signatures
46              can be restricted with the -t option.
47
48       -b, --backup
49              Create  a  signature  backup  to  the  file   $HOME/wipefs-<dev‐
50              name>-<offset>.bak.  For more details see the EXAMPLES section.
51
52       -f, --force
53              Force  erasure,  even  if  the  filesystem  is mounted.  This is
54              required in order to erase  a  partition-table  signature  on  a
55              block device.
56
57       -h, --help
58              Display help text and exit.
59
60       -J, --json
61              Use JSON output format.
62
63       -n, --noheadings
64              Do not print a header line.
65
66       -O, --output list
67              Specify which output columns to print.  Use --help to get a list
68              of all supported columns.
69
70       -n, --no-act
71              Causes everything to be done except for the write() call.
72
73       -o, --offset offset
74              Specify the location (in bytes) of the signature which should be
75              erased  from  the  device.  The offset number may include a "0x"
76              prefix; then the number will be interpreted as a hex value.   It
77              is possible to specify multiple -o options.
78
79              The  offset  argument may be followed by the multiplicative suf‐
80              fixes KiB (=1024), MiB (=1024*1024), and so  on  for  GiB,  TiB,
81              PiB,  EiB,  ZiB  and YiB (the "iB" is optional, e.g. "K" has the
82              same  meaning  as  "KiB"),  or  the  suffixes  KB  (=1000),   MB
83              (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
84
85       -p, --parsable
86              Print  out  in parsable instead of printable format.  Encode all
87              potentially unsafe characters of a string to  the  corresponding
88              hex value prefixed by '\x'.
89
90       -q, --quiet
91              Suppress any messages after a successful signature wipe.
92
93       -t, --types list
94              Limit  the  set  of printed or erased signatures.  More than one
95              type may be specified in a comma-separated list.   The  list  or
96              individual  types can be prefixed with 'no' to specify the types
97              on which no action  should  be  taken.   For  more  details  see
98              mount(8).
99
100       -V, --version
101              Display version information and exit.
102

EXAMPLES

104       wipefs /dev/sda*
105              Prints information about sda and all partitions on sda.
106
107       wipefs --all --backup /dev/sdb
108              Erases  all  signatures  from  the device /dev/sdb and creates a
109              signature backup file ~/wipefs-sdb-<offset>.bak for each  signa‐
110              ture.
111
112       dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1
113       conv=notrunc
114              Restores an ext2  signature  from  the  backup  file   ~/wipefs-
115              sdb-0x00000438.bak.
116

AUTHOR

118       Karel Zak <kzak@redhat.com>
119

ENVIRONMENT

121       LIBBLKID_DEBUG=all
122              enables libblkid debug output.
123

SEE ALSO

125       blkid(8), findfs(8)
126

AVAILABILITY

128       The  wipefs  command is part of the util-linux package and is available
129       from https://www.kernel.org/pub/linux/utils/util-linux/.
130
131
132
133util-linux                       December 2014                       WIPEFS(8)
Impressum