Comment 2 for bug 1012081

Revision history for this message
Martin Pitt (pitti) wrote : Re: util-linux needs updating to 2.21+

Assigning to LaMont, as he kindly agreed to update the package.

This is also needed to fix wipefs to properly clean up VFAT devices. With the current version you need to call it three times before it succeeds. This is reproduced with the udisks2 test suite, and with these manual commands:

# empty initially:
$ sudo modprobe scsi_debug
$ sudo blkid -p /dev/sdb

# create FAT:
$ sudo mkdosfs -I -n testvfat /dev/sdb
mkdosfs 3.0.12 (29 Oct 2011)
$ sudo blkid -p /dev/sdb
/dev/sdb: SEC_TYPE="msdos" LABEL="testvfat" UUID="CA17-02B3" VERSION="FAT12" TYPE="vfat" USAGE="filesystem"

# wipe it:
$ sudo wipefs -a /dev/sdb
8 bytes were erased at offset 0x36 (vfat)
they were: 46 41 54 31 32 20 20 20

# not empty yet!
$ sudo blkid -p /dev/sdb
/dev/sdb: SEC_TYPE="msdos" LABEL="testvfat" UUID="CA17-02B3" VERSION="FAT12" TYPE="vfat" USAGE="filesystem"

# wiping once more is still not sufficient
$ sudo wipefs -a /dev/sdb
1 bytes were erased at offset 0x0 (vfat)
they were: eb
$ sudo blkid -p /dev/sdb
/dev/sdb: SEC_TYPE="msdos" LABEL="testvfat" UUID="CA17-02B3" VERSION="FAT12" TYPE="vfat" USAGE="filesystem"

# wiping a third time finally works:
$ sudo wipefs -a /dev/sdb
2 bytes were erased at offset 0x1fe (vfat)
they were: 55 aa
$ sudo blkid -p /dev/sdb

$ sudo rmmod scsi_debug