wipefs does not properly clean up vfat signatures

Bug #1046665 reported by Martin Pitt on 2012-09-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Medium
Martin Pitt
Quantal
Medium
Martin Pitt

Bug Description

With the current version you need to call wipefs three times on vfat before it succeeds. This is reproduced with the udisks2 test suite, and with these manual commands:

$ dd if=/dev/zero of=/tmp/img bs=1M count=50 && mkfs.vfat -n txx /tmp/img && wipefs -a /tmp/img && blkid -p /tmp/img
8 bytes were erased at offset 0x36 (vfat)
they were: 46 41 54 31 36 20 20 20
/tmp/img: SEC_TYPE="msdos" LABEL="txx" UUID="3F05-CCD3" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"

After second time:
$ wipefs -a /tmp/img && blkid -p /tmp/img
1 bytes were erased at offset 0x0 (vfat)
they were: eb
/tmp/img: SEC_TYPE="msdos" LABEL="txx" UUID="3F05-CCD3" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"

Third time is the charm:
$ wipefs -a /tmp/img && blkid -p /tmp/img
2 bytes were erased at offset 0x1fe (vfat)
they were: 55 aa

This is fixed in the current upstream version (see bug 1012081), but I'd like to fix it for Quantal as this makes other test suite regressions in udisks hard to see (we missed a regression on i386 for weeks due to this).

Martin Pitt (pitti) on 2012-09-06
Changed in util-linux (Ubuntu Quantal):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Martin Pitt (pitti) wrote :

Committed fix to bzr, and uploaded to unapproved.

Changed in util-linux (Ubuntu Quantal):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.20.1-5.1ubuntu2

---------------
util-linux (2.20.1-5.1ubuntu2) quantal; urgency=low

  * misc-utils/wipefs.c: In --all mode, wipe several times until no further
    signatures are found. This is required for file systems like VFAT which
    can be detected in multiple different ways. This is fixed properly in 2.21
    (see LP #1012081), but does not backport well, so use this local hack for
    now. (LP: #1046665)
 -- Martin Pitt <email address hidden> Thu, 06 Sep 2012 08:00:00 +0200

Changed in util-linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers