Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE not mounting LUKS partition
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Stopi
n00b
n00b


Joined: 28 Jul 2016
Posts: 20
Location: Laos

PostPosted: Mon Jan 17, 2022 3:50 pm    Post subject: KDE not mounting LUKS partition Reply with quote

Hi there!

After last world update, I've lost the ability to mount LUKS partitions in Plasma.

The systray correctly shows my USB external disk, and when I click to open it, it even display the popup for asking the password.
After I provide the LUKS passphrase, it fails mounting saying I don't have the permissions.

It appears the LUKS partition was properly deciphered, and I can mount it as root.
If I add an entry in fstab with "user" option, I can even mount it as regular user.
But KDE can't, neither from systray nor from dolphin.
However if I manually mount then it works perfectly when I ask for umount from the systray.

Yes, I'm in the "plugdev" group.
This used to work...

I found a similar issue from the past: https://bugs.gentoo.org/429618#c1
But my system is up to date:
Code:
=sys-fs/eudev-3.2.11-r1
=sys-fs/udisks-2.9.4
=kde-frameworks/kio-5.88.0-r2


I'm probably missing some polkit config:
Code:
# ls -lah /etc/polkit-1/rules/50-udisks.rules
-rw-r--r-- 1 polkitd root 2,3K 11 mai    2018 /etc/polkit-1/rules.d/50-udisks.rules
# cat /etc/polkit-1/rules.d/50-udisks.rules
polkit.addRule(function(action, subject) {
  var YES = polkit.Result.YES;
  // NOTE: there must be a comma at the end of each line except for the last:
  var permission = {
    // required for udisks1:
    "org.freedesktop.udisks.filesystem-mount": YES,
    "org.freedesktop.udisks.filesystem-mount-system-internal": YES,
    "org.freedesktop.udisks.luks-unlock": YES,
    "org.freedesktop.udisks.drive-eject": YES,
    "org.freedesktop.udisks.drive-detach": YES,
    // required for udisks2:
    "org.freedesktop.udisks2.filesystem-mount": YES,
    "org.freedesktop.udisks2.filesystem-mount-system": YES,
    "org.freedesktop.udisks2.encrypted-unlock": YES,
    "org.freedesktop.udisks2.eject-media": YES,
    "org.freedesktop.udisks2.power-off-drive": YES,
    // required for udisks2 if using udiskie from another seat (e.g. systemd):
    "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
    "org.freedesktop.udisks2.filesystem-unmount-others": YES,
    "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
    "org.freedesktop.udisks2.eject-media-other-seat": YES,
    "org.freedesktop.udisks2.power-off-drive-other-seat": YES
  };
  if (subject.isInGroup("plugdev")) {
    return permission[action.id];
  }
});


Please help.
Back to top
View user's profile Send private message
Stopi
n00b
n00b


Joined: 28 Jul 2016
Posts: 20
Location: Laos

PostPosted: Mon Jan 24, 2022 1:27 pm    Post subject: Reply with quote

Well, apparently this is not only puzzling me, 7 days and 100+ views but no answer. :(

I've tried things since then, but still no luke (all commands are entered as regular user, not root).
Code:
$ udisksctl unlock -b /dev/sdc1
Passphrase:
Unlocked /dev/sdc1 as /dev/dm-2.
$ udisksctl mount -b /dev/dm-2
Object /org/freedesktop/UDisks2/block_devices/dm_2d2 is not a mountable filesystem.

Unlocking the drive with LUKS passphrase also created an entry in /dev/mapper:
Code:
$ udisksctl mount -b /dev/mapper/luks-cd909ea8-d7a2-422f-b338-231c16672b66
Error looking up object for device /dev/mapper/luks-cd909ea8-d7a2-422f-b338-231c16672b66

However, if I simply use the mount command it works very well, both with /dev/dm-2 or /dev/mapper/luks-cd909ea8-d7a2-422f-b338-231c16672b66.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum