On Mon, Sep 22, 2025 at 12:06:19AM +0000, Andy Smith via GLLUG wrote:
Hi,

On Sun, Sep 21, 2025 at 08:40:56PM +0100, Henrik Morsing via GLLUG wrote:
It was blank but when I check it now, it is there:

# tune2fs -l /dev/sda6 | grep UU
Filesystem UUID:          23ba8ae2-5f38-43e7-959a-8495f6889302

I must have eventually done something that set it?! blkid is still not
showing it though. I've added it to fstab, hoping it will now work.

Can I just check that you are running blkid as root to check this? blkid
has the really confusing behaviour of only reporting some info from a
cache if it is run by non-root:


morsing@laptop:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev             1865972       0   1865972   0% /dev
tmpfs             380876    1424    379452   1% /run
/dev/sdb1       12654704 6494192   5495888  55% /
tmpfs            1904376      16   1904360   1% /dev/shm
tmpfs               5120       8      5112   1% /run/lock
tmpfs               1024       0      1024   0% 
/run/credentials/systemd-journald.service
tmpfs            1904376       8   1904368   1% /tmp
/dev/sdb6       98109708 1096044  91983828   2% /home
tmpfs               1024       0      1024   0% 
/run/credentials/[email protected]
tmpfs             380872    4120    376752   2% /run/user/1000
morsing@laptop:~$ su - Password: root@laptop:~# blkid
/dev/sdb5: UUID="3e79cbc6-22d3-4b7c-9da5-89f8f3ded61b" TYPE="swap" 
PARTUUID="a1771adb-05"
/dev/sdb1: UUID="bf15ddf4-5d58-4048-a23f-36261dbbd60c" BLOCK_SIZE="4096" TYPE="ext4" 
PARTUUID="a1771adb-01"
/dev/sda2: LABEL="Vida" BLOCK_SIZE="512" UUID="60F07CFFE675BC45" TYPE="ntfs" 
PARTUUID="000eca41-02"
/dev/sda1: UUID="640F-F0C9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="000eca41-01"
root@laptop:~# tune2fs -l /dev/sdb6 | grep UU
Filesystem UUID:          23ba8ae2-5f38-43e7-959a-8495f6889302
root@laptop:~# grep UUID /etc/fstab # device; this may be used with UUID= as a more robust way to name devices
UUID=bf15ddf4-5d58-4048-a23f-36261dbbd60c /          ext4    errors=remount-ro 
0       1
#UUID=23ba8ae2-5f38-43e7-959a-8495f6889302 /home      ext4    defaults        0 
      2
UUID=3e79cbc6-22d3-4b7c-9da5-89f8f3ded61b none            swap    sw            
  0       0
root@laptop:~# ls /dev/disk/by-uuid/
3e79cbc6-22d3-4b7c-9da5-89f8f3ded61b  60F07CFFE675BC45  640F-F0C9  
bf15ddf4-5d58-4048-a23f-36261dbbd60c




Generally "lsblk --fs" may be a better choice because it will give
consistent output no matter who it is run as. It would be getting info
from the udev daemon which Debian will be using by default.

root@laptop:~# lsblk --fs
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% 
MOUNTPOINTS
sda ├─sda1 vfat FAT32 640F-F0C9 └─sda2 ntfs Vida 60F07CFFE675BC45 sdb ├─sdb1 ext4 1.0 bf15ddf4-5d58-4048-a23f-36261dbbd60c 5.2G 51% / ├─sdb2 ├─sdb5 swap 1 3e79cbc6-22d3-4b7c-9da5-89f8f3ded61b [SWAP]
└─sdb6                                                           87.7G     1% 
/home



Since tune2fs reports the partition has a UUID it will be interesting to
know if udev sees that, which is what blkid and lsblk will show.

You mentioned that there is no link in /dev/disk/by-uuid for this
partition. It would also be interesting to know if this partition has a
label assigned by you, and if so if that label appears in output of
tune2fs, blkid/lsblk and is p[resent or not in /dev/disk/by-label.

root@laptop:~# ls /dev/disk/by-label/
Vida
root@laptop:~#
(VIDA is my Windows separate disk)

None of the partitions show labels using tune2fs or e2label.



You can query everything that udev thinks it knows about a partition
like (root not needed):

$ udevadm info --query=property --name=/dev/sda6


root@laptop:~# udevadm info --query=property --name=/dev/sdb6 | grep -E 
"LABEL|UUID|DEVLINKS"
ID_PART_TABLE_UUID=a1771adb
DEVLINKS=/dev/disk/by-path/pci-0000:00:1f.2-ata-2.0-part6 
/dev/disk/by-diskseq/2-part6 /dev/disk/by-id/wwn-0x50026b766b039cd2-part6 
/dev/disk/by-path/pci-0000:00:1f.2-ata-2-part6 
/dev/disk/by-id/ata-KINGSTON_SV300S37A120G_50026B766B039CD2-part6 
/dev/disk/by-path/pci-0000:00:1f.2-ata-2.0-part/by-partnum/6
root@laptop:~#

Regards,
Henrik Morsing
--


--
GLLUG mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/gllug

Reply via email to