blkid --match-types has no effect

Bug #2071807 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Util-Linux-ng
New
Unknown
initramfs-tools (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

--match-types seems to have no effect:

```
$ blkid
/dev/vda2: UUID="a89f4e16-bf48-4c85-8555-04f2fa8a6eb7" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="62d912c9-c2f0-4b8d-b1f2-bf0dba2787f5"
$ sudo blkid -p /dev/vda2
/dev/vda2: UUID="a89f4e16-bf48-4c85-8555-04f2fa8a6eb7" VERSION="1.0" FSBLOCKSIZE="4096" BLOCK_SIZE="4096" FSLASTBLOCK="6277888" FSSIZE="25714229248" TYPE="ext4" USAGE="filesystem" PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="62d912c9-c2f0-4b8d-b1f2-bf0dba2787f5" PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="2203648" PART_ENTRY_SIZE="50223104" PART_ENTRY_DISK="253:0"
$ sudo blkid -p --match-types swap /dev/vda2 || echo $?
/dev/vda2: PART_ENTRY_SCHEME="gpt" PART_ENTRY_UUID="62d912c9-c2f0-4b8d-b1f2-bf0dba2787f5" PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="2203648" PART_ENTRY_SIZE="50223104" PART_ENTRY_DISK="253:0"
```

I expect blkid will fail if the type does not match.

This behavior is the same on 22.04 and 24.04 and 24.10 (util-linux 2.39.3-9ubuntu6).

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: util-linux 2.39.3-9ubuntu6
ProcVersionSignature: Ubuntu 6.8.0-36.36-generic 6.8.4
Uname: Linux 6.8.0-36-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: Unity:Unity7:ubuntu
Date: Wed Jul 3 13:13:10 2024
InstallationDate: Installed on 2022-03-20 (836 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
SourcePackage: util-linux
UpgradeStatus: Upgraded to noble on 2024-04-22 (72 days ago)

Revision history for this message
Benjamin Drung (bdrung) wrote :
summary: - --match-types has no effect
+ blkid --match-types has no effect
Benjamin Drung (bdrung)
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

It is correct behavior according to https://github.com/util-linux/util-linux/issues/3111

So initramfs-tools need to be changed.

affects: util-linux (Ubuntu) → initramfs-tools (Ubuntu)
Changed in util-linux-ng:
status: Unknown → New
Revision history for this message
Benjamin Drung (bdrung) wrote :

This bug was fixed in the package initramfs-tools - 0.142ubuntu30

---------------
initramfs-tools (0.142ubuntu30) oracular; urgency=medium

  [ Jeffery To ]
  * hooks/resume: Fix resume device type check

 -- Benjamin Drung <email address hidden> Fri, 05 Jul 2024 09:56:37 +0200

Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.