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:

man blkid:

    lsblk(8) provides more information, better control on output
    formatting, easy to use in scripts and it does not require root
    permissions to get actual information. blkid reads information
    directly from devices and for non-root users it returns cached
    unverified information. blkid is mostly designed for system services
    and to test libblkid(3) functionality.

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.

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.

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

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

Some interesting keys from my system:

$ udevadm info --query=property --name=/dev/sda4
ID_FS_LABEL=root
ID_FS_UUID=6c002531-47de-4f43-80bf-3b39fafxxxxx
DEVLINKS=/dev/disk/by-path/pci-0000:00:17.0-ata-4-part4 
/dev/disk/by-path/pci-0000:00:17.0-ata-4.0-part4 
/dev/disk/by-id/wwn-0x5002538d425xxxxx-part4 
/dev/disk/by-uuid/6c002531-47de-4f43-80bf-3b39fafxxxxx 
/dev/disk/by-partuuid/9a52a771-aa4a-4fb8-b74a-66c6ce399aa7 
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S3R0NF0JA1XXXXX-part4 
/dev/disk/by-label/root

If udev is not seeing the UUIDs and labels you set then links aren't
going to be made in /dev/disk/by-… and trying to use them isn't going to
work. I don't know what would cause udev to fail to read those things
though.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

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

Reply via email to