Questions tagged [udisks]
udisks provides a daemon that implements interfaces that can be used to enumerate and perform operations on storage devices and a cli tool - udisksctl, to query and use the daemon.
83 questions
3
votes
3
answers
76
views
Headless disk-mount with user permissions
There is a headless machine, with Debian as its OS:
$ cat /etc/issue
Debian GNU/Linux 11 \n \l
$ uname -a
Linux mymachine 6.1.99 #33 SMP Tue Jan 21 11:32:39 CST 2025 aarch64 GNU/Linux
What I wish to ...
0
votes
4
answers
56
views
Mount a partition from a script unless it is already mounted
I would like to mount a partition of an external hard drive from a script using
udisksctl mount --block-device /dev/sda1
and in the end of the script I would like to unmount it.
However, it may ...
3
votes
1
answer
384
views
A way to disable udisks "housekeeping" short of disabling udisks?
I have a USB hard drive connected to Raspberry Pi OS that seemingly never spins down. It turns out that udisks2.service is performing regular "housekeeping" and failing:
Sep 05 02:32:13 rpi ...
0
votes
1
answer
181
views
What systemd service mounts filesystems in /media/$USER?
I have some mount units that are not always being started. When one of them isn't started, I find that the corresponding device is instead mounted in /media/${USER}. What do I need to do to make these ...
0
votes
0
answers
253
views
Arch Linux - Unable to mount Windows NTFS Partition using GUI
My PC is running a dual-boot setup. I have two NVMe Drives, running Windows 10 and Arch Linux respectively. I first installed Windows, then Arch. My bootloader is GRUB and is able to boot to both OSs. ...
2
votes
2
answers
340
views
mount options of udisks2 (dmask, fmask) are not applied when mounted with udisksctl (exfat fs)
I have a removable SD Card formatted with exfat which I would like to mount with udisksctlvia the udisks2 mechanism.
What I want to do is to replicate a noexec option by using dmask=0002 and fmask=...
0
votes
0
answers
60
views
Replicating 'udisks power-off' behavior (without udisks)
udisks exists for regular users, root must (and is) able to live without it, I need help figuring out how.
The goal is to do exactly what
udisks power-off /dev/sdX
does without udisks. hdparm is out ...
3
votes
1
answer
905
views
udisksctl: get loop device and mount point without resorting to parsing localized output?
udisksctl is my tool of choice when dealing with file system images (recent example, but I've been doing this all over the place).
The dance typically looks like
fallocate -l ${img_size} filesystem....
0
votes
1
answer
268
views
How to change default automount USB path to /mnt/sdXX?
Default mount path with udisks2, udiskie is /media/XXXXX
On some distributions /media/user/XXXXXX
How to change automount path for USB drives to a shorter /mnt/sdb1 /mnt/sdc2 etc.
With udisks2, ...
0
votes
0
answers
104
views
Hide docker mounts from udisks / file explorer
Recently, I moved my docker data from /var/lib/docker to the home directory: /home/me/data/docker. Since then, I see mounted storages in my file explorer (Nemo).
I've tried to google for udisks rules ...
1
vote
0
answers
410
views
How to modify/extend USB device access permissions in Debian?
I have a PC with Debian 10. I need the USB drives to have broader permissions than those given by default by the system.
I will give an example: with the user "john" being authenticated, ...
0
votes
1
answer
1k
views
udisksctl command (udisks package) does not work on NixOS after upgrade to 22.11
What I get when trying to mount an external drive:
$ udisksctl mount --block-device /dev/sdb1
The program 'udisksctl' is not in your PATH. You can make it available in an
ephemeral shell by typing:
...
3
votes
1
answer
9k
views
Why is NTFS has a dirty mark and why can't NTFS3 mount dirty NTFS partitions?
https://wiki.archlinux.org/title/NTFS#Unable_to_mount_with_ntfs3_with_partition_marked_dirty
When a NTFS partition is marked dirty, NTFS3 cannot mount this on linux
But NTFS-3G (and also Windows) can
...
3
votes
0
answers
974
views
Udiskie: org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain
I'm trying to run udiskie and udisks2's udisksctl to mount an SD card without root privileges. System is Debian, CL-only, headless:
$ udiskie-mount /dev/mmcblk0p1 --verbose
DEBUG [2023-04-04 00:35:15,...
0
votes
1
answer
183
views
btrfs mount with compress fails with udisksctl but succeeds with mount?
$ sudo mkfs.btrfs -fL borgbackups /dev/vgxubuntu/borgbackups
$ udisksctl mount -o compress=ztsd:15 -b /dev/mapper/vgxubuntu-borgbackups
Error mounting /dev/dm-3: GDBus.Error:org.freedesktop.UDisks2....
2
votes
1
answer
804
views
udisks excluding system global mount options when mounting
I have updated my embedded linux, but the udisksctl does not work as expected anymore. If I try to mount a ext4 formatted flash drive I get the following error:
root@system:~# udisksctl mount -b /dev/...
0
votes
0
answers
154
views
Automount as another user (not logged)
When I plug a USB Key on my desktop install of a redhat fork, USB is automounted as /run/media//. I would like that plugged removable device will be automounted for another logged user (not the ...
1
vote
0
answers
339
views
udiskctl loop-setup automatically mounts the image without asking
I need to just set up a loop device without automatically mounting the device. I need to mount afterwards because the ISO contains some hidden files.
How do I prevent udisksctl from automatically ...
1
vote
0
answers
369
views
Run backup script after systemd automounts specific USB device
I need to run a script after a specific USB stick is mounted, particulary, to perform a backup.
I've seen many (and old) posts that mount devices inside udev rules, however modern OSes already have ...
3
votes
0
answers
873
views
Mounting drive as unpriviliged user with systemd mount unit or systemd-mount
Is there any way to mount an external drive as an unpriviliged user, either with a pre-defined mount unit or with a transiently generated one with systemd-mount?
If I write a file run-media-myuser-...
2
votes
1
answer
1k
views
Allow udisksctl loop-setup without authentication for specific users
I have some tests that verify the behavior of a program under conditions where it runs out of disk space. Previously I've used dd to create a small-ish file then mkfs to make a filesystem on it, then ...
4
votes
1
answer
7k
views
mount usb drive without sudo
In the terminal I have to use sudo mount, otherwise it says operation not permitted.
But in the file explorer (started normally, without sudo) I can mount by pressing the icon next to the external ...
4
votes
3
answers
3k
views
How to tell systemctl to automatically unmount a drive if it's idle and remove directory after unmounting?
I have this entry in fstab:
LABEL=cache /disks/cache ext4 rw,user,x-mount.mkdir,relatime,noauto,errors=remount-ro,x-systemd.idle-timeout=120min 0 0
What I expoect to do is:
to mount the disk with ...
2
votes
1
answer
772
views
In search for good practices: Mounting disks
I think I did many terrible things at the past, empty directories everywhere, whatever priviledges they had and even mounting a fs inside other mounted fs.
Now I want to make the things right and ask ...
0
votes
1
answer
3k
views
Overriding udisks2 /media/$USER/mount with custom fixed mount point for specific volume, under Debian Buster
I am using Debian Buster, 10.7, and I am relatively new to udev/udisks2/systemd and have been making a effort to get to know them better and have learned quite a lot, though I cannot seem to figure ...
1
vote
1
answer
2k
views
x-gvfs-show: Cannot display second hard drive left side of nautilus
I am trying to get fstab option x-gvfs-show to work as expected on my default installation of Debian/buster/amd64. I did stumble upon:
What is the difference between mounting in fstab and by mounting ...
1
vote
2
answers
2k
views
Change the name of the mountpoint used by udisks2
The default name is /run/media/$USER/<UUID>. Instead of UUID, I want it to use the partlabel (if it exists), which means I want to change the mountpoint's name to /run/media/$USER/<partlabel&...
1
vote
1
answer
4k
views
Change default mount point for udisks
KDE Plasma on Arch Linux mounts removable devices to /run/media/[user]/* by default, but, as I had an Ubuntu derivative before, I need it to be mounted to /media/[user] because of the symlinks and ...
0
votes
0
answers
690
views
udisks2: Use a specific mount point when mounting from file manager on-demand
I have an internal partition that I do not automount using fstab, but mount on-demand from the file manager by clicking on the partition icon, using udisks2.
This setup works great, except that ...
2
votes
2
answers
1k
views
Format a Thumb drive with an OS Partition
I have a thumb drive with a partion containing a bootable POP-OS image. I'd like to reclaim this space and just use as a thumb drive, but in "Disks" utility in POP_OS, if I try to delete:
&...
3
votes
1
answer
7k
views
Speeding up udisks2.service in linux
I'm analyzing the systemd and I want to improve my system's booting speed.The number one service in the blame list of systemd-analyze by a clear gap is udisks2.service with almost 10 seconds ( those ...
0
votes
0
answers
542
views
Change File Permissions inside an Image File in Linux
I have an application (running in an IDE under my user account) that does the following:
It creates an empty file with ~1GiB size.
It calls mkfs on this file (btrfs currently, but may change in future)...
4
votes
1
answer
1k
views
How to allow non-root users to mount bitlocker encrypted external drives?
As a non-root user I would like to be able to mount external hard drives which have been encrypted with microsoft bitlocker. The admin (with root access) can set something up if I can tell him how to ...
3
votes
1
answer
1k
views
Spin down of Icy Box Raid Enclosure not working
I am running Ubuntu server 18.04 and I am using an ICY BOX IB-RD2253-U31 enclosure with two WD Black disks (no NAS disks) in RAID 1 mode (mirror).
I want to put the two disks in sleep mode / spin ...
0
votes
1
answer
2k
views
Service 'org.freedesktop.UDisks2' does not exist
I am using Debian Sid, with OpenRC init system. I have installed the latest udisks2 (2.8.4), as well as qdbus-qt5. Earlier (an unspecified time before this error popper up), I was able to query org....
2
votes
0
answers
915
views
Why "udisksctl" and "mount -o loop" giving different root permissions after mounting?
I am trying to mount an iso using udisksctl and it appears that the bash scripts inside these are having only read permission
[root@hostname ~]# udisksctl loop-setup -r -f /root/test.iso
Mapped file /...
2
votes
0
answers
3k
views
Automount LVM logical volume with a udev rule and udisks2
I want to automatically mount an LVM logical volume on an external drive as soon as it is connected to the computer.
The solution I choose here is to use udev to detect plug in events and udisks2 to ...
1
vote
1
answer
711
views
Setting disk ownership when Nemo mounts a hot-plugged USB block-device?
How does one control automount ownership, i.e. the mount 'seat' ownership?
In Nemo's left pane, under Devices, manually clicking on a plugged-in, but not yet mounted, USB memory device, cause it to ...
1
vote
1
answer
743
views
Removable volume not appearing in file managers
Neither Nautilus, Caja or Thunar show my removable storage device in the list of devices.
I can mount it manually using udisksctl:
$ udisksctl mount --block-device /dev/sdd1 Mounted /dev/sdd1 at
/...
2
votes
1
answer
5k
views
Corrupted SD card is readonly and not mounting
I'm having issues trying to recover a corrupted micro-SD card (not the data, just the card). I think it was formated to be part of the internal storage of an Android phone when that was an option.
# ...
25
votes
1
answer
8k
views
How to power on an external hard-drive after powering it off?
When I "safely remove" an external hard-drive from my file-manager (Thunar), the whole hard-drive is powered off and disappears from /dev. Therefore, I guess that under the hood, this is done by ...
5
votes
2
answers
3k
views
Configure udisks permission
On my Debian Stretch, my USB drive is auto-mounted on login, AFAICT. It is placed under /media/currentuser/DRIVENAME. I suppose udisks takes care of this (but I could be wrong). No entry in fstab ...
0
votes
1
answer
2k
views
Is udisks2 able to mount anything the command "mount" can? Can I mount smb shares for instance?
I know that udisks2 can be used to mount filesystems. But what kind of filesystems? By reading information around this is not completely clear to me.
Can I only mount local filesystems? Or can I ...
3
votes
3
answers
6k
views
Provide password to udisks to unlock LUKS-encrypted device
Currently, I do this to mount my encrypted thumbdrive:
# Works!
pass thumbdrive-password | # get device password entry from password manager
head -n 1 | # get the device password itself
sudo ...
1
vote
1
answer
1k
views
udisks - automatic mounting partitions at startup
Update:
I posted an answer following @sourcejedi's tip!
I installed OpenMandriva Lx 3.0 and Rosa Linux R10 on the same PC. And I noticed that unlike previous systems (I used Mageia 5, Rosa R9), which ...
1
vote
2
answers
1k
views
polkit rules not recognized raspbian stretch
I'm running a raspbian stretch and I want to grant every member of group user the right to mount and unmount usb-pendrives
Therefore I installed: udisks2
I created a *.rules file /usr/share/polkit-1/...
2
votes
1
answer
1k
views
systemd - how to power on USB drive? [duplicate]
With udisksctl I'm able to power-off device:
udisksctl power-off --block-device /dev/sdd
But how can I power it back ON from commandline?
1
vote
1
answer
884
views
udisks2 - acl can't get write permissions for a regular user
External storage devices are successfully mounted to /run/media/myuser/ via udisks2 (udisksd service). I can read data from devices. However I can NOT write to them. I'm trying to edit directory ACLs ...
1
vote
0
answers
436
views
I have udisks2 but no rules file to edit
I wanted to add some rules to udisks2 by adding them to /etc/udev/rules.d/99-udisks2.rules as suggested in various sources. However, this file does not exist on my system in that folder. I have ...
0
votes
1
answer
1k
views
udisks SMART / APM stopped working?
I have a laptop with the accursed Western Digital hard drive. I have used SMART to look at Load/Unload cycles (smartctl -a|grep Load). They increase too fast towards the 300,000 lifetime limit.
I ...