Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: 'lsblk' broken? (Read 453 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

'lsblk' broken?

You're supposed to be able to specify which columns 'lsblk' displays.

When i do something like this, the UUID fields are all blank:

Code: [Select]
$ lsblk -o +PTUUID,PARTUUID,UUID,NAME /dev/nvme0n1
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS PTUUID PARTUUID UUID NAME
nvme0n1     259:0    0  1.8T  0 disk                                  nvme0n1
├─nvme0n1p1 259:1    0  512M  0 part                                  nvme0n1p1
├─nvme0n1p2 259:2    0   28G  0 part /                                nvme0n1p2
├─nvme0n1p3 259:3    0  1.8T  0 part /home/craig                      nvme0n1p3
└─nvme0n1p4 259:4    0    4G  0 part                                  nvme0n1p4

It's not like these fields aren't set, though:

Code: [Select]
$ blkid /dev/nvme0n1*
/dev/nvme0n1: PTUUID="7400f81d-ff7a-49aa-a055-18752ca88044" PTTYPE="gpt"
/dev/nvme0n1p1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="68FE-FAC0" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI" PARTUUID="79a8c2b5-5abd-4704-9160-0e53d5583bc0"
/dev/nvme0n1p2: UUID="3b2ab9d1-6f14-4cdc-aca3-6a6fbf1d0841" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Artix" PARTUUID="1a4f7c06-a45a-4831-8853-ef932ad18ce0"
/dev/nvme0n1p3: UUID="1f31cc68-c8d8-4db5-bb0a-87129902f86f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="home" PARTUUID="ab72fca1-1e4f-4411-b51c-379677045a0e"
/dev/nvme0n1p4: PARTLABEL="swap" PARTUUID="33db7039-dd43-487e-891c-0dc580fe7077"

Same thing happens with all (not just SSD) devices.  /dev/sdb is a USB stick:

Code: [Select]
$ lsblk -o +PTUUID,PARTUUID,UUID,NAME /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS                   PTUUID PARTUUID UUID NAME
sdb      8:16   1 28.9G  0 disk                                                    sdb
└─sdb1   8:17   1  580M  0 part /run/media/craig/GParted-live                      sdb1  
$ blkid /dev/sdb*
/dev/sdb: BLOCK_SIZE="2048" UUID="2025-07-12-12-33-13-00" LABEL="GParted-live" TYPE="iso9660" PTUUID="61c5ca29" PTTYPE="dos"
/dev/sdb1: BLOCK_SIZE="2048" UUID="2025-07-12-12-33-13-00" LABEL="GParted-live" TYPE="iso9660" PARTUUID="61c5ca29-01"

I searched but didn't find anything related to this.

Bonus question (just in case anyone knows)... Wikipedia says (but i've seen this in numerous other places):
Code: [Select]
The globally unique identifier (GUID) for the EFI system partition in the
GUID Partition Table (GPT) scheme is C12A7328-F81F-11D2-BA4B-00A0C93EC93B.

I've looked at my ESPs and that GUID is not what is set.  I've looked to see if this is optional or what and... nothing.  It seems obvious that my firmware doesn't care but.. I just want to know what's going on.  :-)

Confusion resolved.  PARTTYPE different from PARTUUID (re 'lsblk' columns).

Re: 'lsblk' broken?

Reply #1
For some UUID fields to be shown with lsblk and blkid these commands need to be run as root.

artist

 

Re: 'lsblk' broken?

Reply #2
Oh man... thank you!