wipefs - wipe a signature from a device
wipefs [-ahnpqtV] [-o offset] device...
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.
-a, --all Erase all available signatures. The set of erased signatures can be restricted with the -t option. -b, --backup Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more details see the EXAMPLES section. -f, --force Force erasure, even if the filesystem is mounted. This is required in order to erase a partition-table signature on a block device. -h, --help Display help text and exit. -n, --no-act 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. -p, --parsable Print out in parsable instead of printable format. Encode all potentially unsafe characters of a string to the corresponding hex value prefixed by '\x'. -q, --quiet 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 see mount(8). -V, --version 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 signature. dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc Restores an ext2 signature from the backup file ~/wipefs- sdb-0x00000438.bak.
Karel Zak <firstname.lastname@example.org>
LIBBLKID_DEBUG=all enables libblkid debug output.
The wipefs command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.