[parted-devel] parted reporting old file system names

Mike Fleetwood mike.fleetwood at googlemail.com
Wed Dec 12 23:58:05 UTC 2012


I've been doing some testing of wiping file systems, either using the
wipefs command or by writing zeros over the whole partition, and find
that in many distribution / parted version combinations it prints the
type of the file system that use to be there, even after formatting with
a new file system.  I'm doing this for a GParted patch I am working on.
Can anybody explain the behaviour and how to fix it?


Details of more tested combinations in:
    GNOME Bug 688882 - Improve clearing of file system signatures

Failing example on my Fedora 17 box with parted 3.1 (from Fedora 18
    Create a new partition and format it with jfs.  Write zeros over the
    partition, reformat it as ext2, yet parted still reports the type as

# parted /dev/sda print
Model: ATA SAMSUNG SSD 830 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  525MB   524MB   primary   ext4            boot
 2      525MB   2673MB  2147MB  primary   linux-swap(v1)
 3      2673MB  13.4GB  10.7GB  primary   ext4
 4      13.4GB  121GB   107GB   extended
 5      13.4GB  77.8GB  64.4GB  logical   ext3
 6      77.8GB  78.4GB  524MB   logical   ext4
 7      78.4GB  80.5GB  2147MB  logical   linux-swap(v1)
 8      80.5GB  91.2GB  10.7GB  logical   ext4
 9      91.2GB  91.8GB  524MB   logical   ext4
10      91.8GB  93.9GB  2147MB  logical   linux-swap(v1)
11      93.9GB  105GB   10.7GB  logical   ext4
12      105GB   106GB   1074MB  logical   jfs

# dd if=/dev/zero of=/dev/sda12 bs=1M
# parted /dev/sda print
12      105GB   106GB   1074MB  logical   jfs
# mkfs.ext2 /dev/sda12
# wipefs /dev/sda12
offset               type
0x438                ext2   [filesystem]
                     UUID:  5fe4cc76-61be-4878-b337-b4c5c155fb0c
# parted /dev/sda print
12      105GB   106GB   1074MB  logical   jfs

More information about the parted-devel mailing list