Bug 557831

Summary: blkid detects ext4 fs as minix fs
Product: [Fedora] Fedora Reporter: Danny Baumann <dannybaumann>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 12CC: kzak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: util-linux-ng-2.16.2-6.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-20 00:18:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Copy of the wrongly detected superblock
none
Superblock after successful boot none

Description Danny Baumann 2010-01-22 17:14:32 UTC
Created attachment 386198 [details]
Copy of the wrongly detected superblock

Description of problem:
Today, blkid detected my (perfectly valid) ext4 root filesystem also as minix filesystem, thus throwing an error and not determining the filesystem type correctly. As a result, mount could not mount my root filesystem type (complaining that I need to specify the filesystem type), leaving me with an unbootable system.

I will attach a copy of the superblock in the broken as well as in the correct state. One can observe that in the broken case, a minix fs signature (2 bytes only) was detected at offset 0x410, the position of the least two significant bytes of the ext4 free inode count.

A workaround was specifying rootfstype=ext4 on the grub kernel command line, which allowed booting. After that, fortunately a few additional inodes were used, thus I needed that workaround only once ;-)

Still, blkid should use better heuristics and/or additional sanity checks to determine the type of the filesystem, because a root filesystem being unmountable by pure coincidence is not a good thing for the average user, who will probably reinstall his whole system.

Comment 1 Danny Baumann 2010-01-22 17:15:04 UTC
Created attachment 386199 [details]
Superblock after successful boot

Comment 2 Karel Zak 2010-01-27 13:04:58 UTC
Nice catch. Yes, you're right the minix probing code is too simple. It seems that we can also check for a valid number of inodes, zones and blocksize in minix superblock. I'll fix it. Thanks.

Comment 3 Karel Zak 2010-01-27 14:03:43 UTC
Fixed in upstream repository by commit 75cb940e23a852c81044117753222d163bb3355f.

Comment 4 Fedora Update System 2010-02-17 19:36:42 UTC
util-linux-ng-2.16.2-6.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/util-linux-ng-2.16.2-6.fc12

Comment 5 Fedora Update System 2010-02-20 00:18:19 UTC
util-linux-ng-2.16.2-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.