Multiple filesystem signatures on a partition

Share on Facebook0Tweet about this on TwitterShare on Google+0

I have a separate partition for /root which is mounted through /etc/fstab. Last night I’ve done a huge update to my Fedora 18 laptop and today it got stuck in the mounting step.

Use rdbreak=pre-mount boot parameter

This is a nice kernel command line parameter which tells dracut to spawn a shell before mounting the filesystems. After dropping into the shell, I looked at blkid output:

# blkid
/dev/sda1: UUID="3E1691BA1691739D" TYPE="ntfs"
/dev/sda4: LABEL="LENOVO_PART" UUID="D4F69CB3F69C9778" TYPE="ntfs"
/dev/sda6: LABEL="f18" UUID="d73af424-0839-49d8-baff-fc3021f8160d" TYPE="ext4"

Oops, blkid doesn’t show /dev/sda2. Let’s force it to do low-level superblock probing which avoids blkid caches:

# blkid -p /dev/sda2
/dev/sda2: ambivalent result (probably more filesystems on
           the device, use wipefs(8) to see more details)

So, it seems that somehow the partition got multiple filesystem signatures instead of only ext4. Let’s look at it using wipefs:

# wipefs /dev/sda2
offset               type
----------------------------------------------------------------
0x4000040            btrfs   [filesystem]
                     UUID:  7630c42b-4275-45af-b7a0-24d05bfa4e5f
 
0x438                ext4   [filesystem]
                     LABEL: ssd75g
                     UUID:  d2675c32-931a-4e6d-8b73-5d9d488f2492

Well this is interesting. As far as I remember, I used btrfs before ext4 on this partition. So it is possible that after the latest updates, the fact that the partition got multiple signatures is not handled anymore by a layer. Let’s erase the signature for btrfs giving its offset:

# wipefs -o 0x4000040 /dev/sda2
/dev/sda2: 8 bytes were erased at offset 0x04000040 (btrfs): 5f 42 48 52 66 53 5f 4d

Now let’s look at what btrfs detects now:

# blkid
/dev/sda1: UUID="3E1691BA1691739D" TYPE="ntfs"
/dev/sda4: LABEL="LENOVO_PART" UUID="D4F69CB3F69C9778" TYPE="ntfs"
/dev/sda6: LABEL="f18" UUID="d73af424-0839-49d8-baff-fc3021f8160d" TYPE="ext4"
/dev/sda2: LABEL="ssd75g" UUID="d2675c32-931a-4e6d-8b73-5d9d488f2492" TYPE="ext4"

Woot, it came back 🙂

Share on Facebook0Tweet about this on TwitterShare on Google+0