Skip to content
Commit 6982f68e authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Workaround not so old wipefs only erasing 1 of 3 vfat signatures (#688882)

Before util-linux 2.21.0, released Feb 2012, wipefs only cleared one of
the three vfat (fat16/fat32) signatures it can be detected by each time
wipefs was run.  Also if a nilfs2 file system was created before all
three signatures were cleared the partition was still recognised as a
vfat file system, albeit a corrupted one, rather than as a nilfs2 file
system.

Old wipefs clearing vfat signatures:
    # wipefs --version
    wipefs from util-linux 2.20.1
    # wipefs -a /dev/sda7
    8 bytes were erased at offset 0x52 (vfat)
    they were: 46 41 54 33 32 20 20 20
    # wipefs -a /dev/sda7
    1 bytes were erased at offset 0x0 (vfat)
    they were: eb
    # wipefs -a /dev/sda7
    2 bytes were erased at offset 0x1fe (vfat)
    they were: 55 aa

New wipefs clearing vfat signatures:
    # wipefs --version
    wipefs from util-linux 2.21.2
    # wipefs -a /dev/sda12
    8 bytes were erased at offset 0x00000052 (vfat): 46 41 54 33 32 20 20 20
    1 bytes were erased at offset 0x00000000 (vfat): eb
    2 bytes were erased at offset 0x000001fe (vfat): 55 aa

Workaround by calling "wipefs -a" three times if the output indicated
only one vfat signature was cleared.

Bug #688882 - Improve clearing of file system signatures
parent 797f0b8e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment