Wipe a device's signature with wipefs
Wipe a device's signature with wipefs
A hard drive or a USB stick that has already had a previous life (a former operating system installed, a disk image in ISO format previously burned) can retain residual signatures invisible in GParted: leftover partition table, leftover filesystem. These signatures can cause undesirable behaviour: an installation refusing to boot, a device impossible to repartition, a partition detected as "unknown" even though it was properly created.
This page describes the diagnostic and cleanup method, using wipefs, applicable to any storage device, regardless of its origin. For a detailed case of a residual GPT signature on an internal hard drive, see the page Failed Linux Installation Due to a Residual GPT Signature.
A concrete case with a USB stick
A 7.25 GB USB stick refused to be reformatted from GParted, with the intent of installing Ventoy on it. This stick had previously been prepared with Balena Etcher to boot a Live image of a Linux distribution. The same kind of blockage can occur with a stick prepared via dd or Gnome Disks, as these tools write the image bit by bit onto the device, thereby reproducing the ISO9660 format of the disk image.
Procedure, in order
1. Identify the device
The device is identified first, to make sure the operations that follow are carried out on the right target.
As a regular user:
2. Unmount all partitions of the device
Before any manipulation, make sure no partition of the device is still mounted.
With administrator privileges:
Where /dev/sdX should be adapted, based on what lsblk found.
Check that nothing remains mounted:
If a partition still appears mounted, unmount it explicitly (replacing the number with the one concerned):
3. Check the partition table type and the presence of signatures
With administrator privileges:
Where /dev/sdX should be adapted, based on what lsblk found.
The -p option forces a low-level probe, which reads the device directly instead of relying on the system's cache. This is decisive here: a stick prepared with dd can retain information cached by udev/blkid that no longer matches reality once the stick has been reused. This command typically reveals several overlapping or contradictory signatures (for example, an ISO9660 signature left over from the distribution's ISO image, in addition to a possible partition table).
4. Confirm with wipefs, in read-only mode
With administrator privileges:
Lists all signatures known to the kernel across the entire device (partition table, filesystems, RAID…), along with their position (offset - the position in bytes of a signature within the device, counted from sector 0). This step makes it possible to see precisely what needs to be erased, before doing so.
5. Erase all residual signatures
With administrator privileges:
As before, /dev/sdX should be adapted, based on what lsblk found.
The -a option erases all the signatures found in the previous step, across the entire device — not just those visible in an active partition table. This is the step that resolves the conflict behind the formatting failure in GParted.
6. Force the kernel to reread the partition table
With administrator privileges:
Without this step, the system may still display a cached state during the next verification, rather than the device's actual state after cleanup.
7. Check effectiveness of the cleanup
With administrator privileges:
/dev/sdX should still be adapted.
Should return nothing (or only the device's generic information): a sign that the device is now on a clean footing.
In addition, it's possible to inspect the raw bytes of the first sector directly:
or, equivalently:
Once the new partition table has been created, the boot sector's end-of-sector signature (55 aa, at bytes 510-511) should be present. This signature is universal: it appears on both a dos table and a gpt table, the latter always starting with a "protective MBR" in the first sector, itself ending with the 55 aa signature as well. Its presence is simply an indicator of consistency in the first sector, regardless of the partition table type in use.
8. Repartition
At this point, GParted can create a new partition table and a partition (ext4, exfat…) without ambiguity.
Key takeaway
It can be a hard drive which previously ran under GPT/UEFI, or a USB thumbdrive prepared with dd, Balena Etcher, or Gnome Disks: the symptom looks the same : a device not behaving as expected, whether it means a silent failure to boot, or a partition GParted flags as "unknown". The reflex is the same in every case: unmount, diagnose with blkid -p and wipefs, then clean up with wipefs -a across the entire device, before rebuilding a healthy partition table.