Bug 2186915

Summary: blkid output changed causing boot failures in rawhide
Product: [Fedora] Fedora Reporter: Jeremy Linton <jeremy.linton>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: POST --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 39CC: kzak
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Linton 2023-04-14 20:15:21 UTC
Description of problem: I upgraded one of my older rawhide installs this morning and the machine failed to boot both with the new 6.3rc6 kernel and the older 6.2.2 kernel. Using that kernel it looked like my machine was unable to find the root by UUID anymore so I switched the fstab entries to PARTUUID, but then realized the xfs modules/etc were missing from the newer 6.3 initrd. Debuging dracut lead me to notice that the blkid type wasn't being printed

# blkid |grep sda4
/dev/sda4: PARTUUID="2f162043-63c2-d145-869b-e53f9db57476"

vs an older blkid

#./blkid |grep sda4
/dev/sda4: UUID="45b931b7-592a-46dc-9c33-d38d5901ec29" BLOCK_SIZE="4096" TYPE="xfs" PARTUUID="2f162043-63c2-d145-869b-e53f9db57476"

Which is a problem because dracut and a few other scripts need to be give the TYPE="xfs" bits in order to enable XFS. The lack of UUID= bits causes problems elsewhere too.





Version-Release number of selected component (if applicable):


How reproducible: 100% on my machine, not tried it elsewhere


Steps to Reproduce:
1. Upgrade to util-linux 2.39 on a machine with an old (fedora 31 timeframe) XFS filsystem
2. run blkid
3.

Actual results:

# blkid |grep sda4
/dev/sda4: PARTUUID="2f162043-63c2-d145-869b-e53f9db57476"

Expected results:
#./blkid |grep sda4
/dev/sda4: UUID="45b931b7-592a-46dc-9c33-d38d5901ec29" BLOCK_SIZE="4096" TYPE="xfs" PARTUUID="2f162043-63c2-d145-869b-e53f9db57476"


Additional info:
Downgrading the machine to libblkid-devel-2.38.1-4.fc38 fixes it.

Comment 1 Jeremy Linton 2023-04-14 20:16:29 UTC
I'm attempting to bisect it with an upstream clone at the moment.

Comment 2 Jeremy Linton 2023-04-14 20:27:13 UTC
The bisect reports: [5e98d8edba109518dfd3f922ee920a4c7d084272] libblkid: xfs: add more superblock fields

Comment 3 Jeremy Linton 2023-04-14 20:38:34 UTC
Although the log reports: 140968: libblkid: LOWPROBE: [31] xfs:
140968: libblkid:   BUFFER: 	reuse: off=0 len=1024 (for off=0 len=1024)
140968: libblkid: LOWPROBE: 	magic sboff=0, kboff=0
140968: libblkid: LOWPROBE: 	call probefunc()
140968: libblkid:   BUFFER: 	reuse: off=0 len=1024 (for off=0 len=272)
140968: libblkid: LOWPROBE: 	read: off=0 len=4096
140968: libblkid: LOWPROBE: incorrect checksum for type xfs, got FA0A3CA3, expected F93C4D8B
140968: libblkid: LOWPROBE: [32] xfs_external_log:
140968: libblkid: LOWPROBE: 	call probefunc()
140968: libblkid: LOWPROBE: 	read: off=0 len=262144

Comment 4 Jeremy Linton 2023-04-14 21:19:57 UTC
Ok, figured it out, it's clearing the wrong sb_crc resulting it computing the wrong CRC in blkid.

Comment 5 Jeremy Linton 2023-04-14 21:40:56 UTC
https://github.com/util-linux/util-linux/pull/2165

Comment 6 Karel Zak 2023-04-17 10:09:46 UTC
Thanks for debugging and bugfix! Fixed in the upstream tree, Fedora will be updated after the next v2.39 upgrade.

Comment 7 Fedora Release Engineering 2023-08-16 08:07:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.