My netbook has little disk, so I carry an SD card encrypted with LUKS.
When I try to unlock and mount it in Alpine (3.23 and edge alike) using
Thunar, I get a "Failed to mount", "Operation cancelled" error. After
unlocking, the encrypted partition disappears from the places list, but
no volume appears in its place.
In general, to mount external volumes with seatd, I can add my user to
the `disk` group and use the Polkit rule
https://wiki.alpinelinux.org/wiki/Polkit#Example1. I had to add a
parenthesis and fix the eject action id for it to work; I've just sent
this correction to the wiki. However, that doesn't fix this issue, which
I observe with both sway+seatd and xfce4+elogind.
The card itself is discovered correctly; in dmesg, I see:
mmc1: new UHS-I speed SDR104 SDXC card at address 5048
mmcblk1: mmc1:5048 SD512 461 GiB
mmcblk1: p1
Thunar correctly unlocks the encrypted partition, and I can replicate
this with udisks2 CLI:
$ udisksctl unlock --block-device /dev/mmcblk1p1
Passphrase:
Unlocked /dev/mmcblk1p1 as /dev/dm-3.
However, the unlocked filesystem then doesn't appear as a volume that a
user can mount, and this I think confuses Thunar:
$ udisksctl mount --block-device /dev/dm-3
Object /org/freedesktop/UDisks2/block_devices/dm_2d3 is not a mountable
filesystem.
I can mount this volume as root:
$ doas mount /dev/dm-3 /mnt
...password:
$ ls /mnt
FreeBSD-15.0-RELEASE-amd64-mini-memstick.img
android-sdk.tar
...and see the rest of my files.
But not as user with Thunar, which doesn't list it (in Debian it does,
in Alpine it does not). I thought the issue might be about a permission
difference, but the encrypted partition and the unlocked filesystem have
the same permissions, owner and group:
$ ls -l /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 1 Mar 19 20:41 /dev/mmcblk0p1
$ ls -l /dev/dm-3
brw-rw---- 1 root disk 253, 3 Mar 20 00:40 /dev/dm-3
What else should I try to debug why the card can't be mounted as user?