USB automount not working for Debian Stretch
Hello, folks!

I installed Kodi Krypton on my Debian Stretch system. In contrast to further versions I now cannot access to USB devices I plug in – they are not mounted automatically, and it seems that you cannot do it manually, too. I suppose the reason for this behaviour is that Stretch does not have the package usbmount. When I start Gnome instead of Kodi automount works as expected.

I know there are several topics online how to reach automount functionality (even in this forum), but some don’t work, some are very complicated, some are too old. So: Is there perhaps someone here who also uses debian stretch as a base for his kodi system and who can help me?

I just want to have back the default behavior. Perhaps there is just a kodi option or a debian package to be needed to install? I would appreciate a simple, straightforward solution :-)

kodi 17 supports udisks for automounting, but debian has migrated to udisks2.
Kodi 18 supports udisks2
Ok, but what can I do considering that my debian stretch uses 17? Somehow switch back to udisks?
yes, or compile kodi 18 from source. Debians kodi package is not supported here, just fyi
Kodi from source is a little bit too sophisticated for me.

It seems plausible not to support every linux distribution, but as this is the Linux subforum and debian is not the most eccentric distribution, I thought someone perhaps has the same problem. So still kindly asking for a simple solution.
you can try udevil or a plain udev rule for automounting outside of kodi
udev, udevil and udisks all sound good, but I need some details – a step-by-step guidance would be great. As I said there are a lot of howtos in the Internet, but none fits sufficiently to my case.
kodi is just an application in that case. So any tutorial for udevil should work.

Add the polkit file from and
start devmon in the background (devmon &) before (auto) starting kodi.
First of all, as there is no “trick” within Kodi (that was one of my questions), this is a non-Kodi issue and this thread is a little bit misplaced here in a Kodi forum.

wsnipex, thanks for clarifying that and thanks for trying to help. I did not use your hint with the polkit file (amongst other things because that script seems basically to be designed for shutdown and suspend permissions).

I tried without success (even added exfat as filetype!) and also saw that this seems to be a common problem. See a German and an English forum thread, both without a real solution.

Nevertheless, the last link helped to give a very dirty workaround: Just add the line
UUID=bla-bla /mnt/usb auto auto,nofail 0 2
to /etc/fstab.

Indeed, automount when Kodi is already running, works – but only for this certain USB stick. As I always use the same one, that’s ok. Furthermore, you cannot unmount the stick manually.

I am not going to mark this topic as solved, but for now I am halfway satisfied.
I did it in the past with following solution with kodi v17, working on debian or ubuntu:
apt install usbmount ntfs-3g

nano /etc/usbmount/usbmount.conf
FILESYSTEMS="vfat ntfs fuseblk ext2 ext3 ext4 hfsplus"
FS_MOUNTOPTIONS="-fstype=ntfs-3g,nls=utf8,umask=007,gid=46 -fstype=fuseblk,nls=utf8,umask=007,gid=46 -fstype=vfat,gid=1000,uid=1000,umask=007"

nano /etc/udev/rules.d/usbmount.rules
KERNEL=="sd*", DRIVERS=="sbp2",         ACTION=="add",  PROGRAM="/bin/systemd-escape -p [email protected] $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
KERNEL=="sd*", SUBSYSTEMS=="usb",       ACTION=="add",  PROGRAM="/bin/systemd-escape -p [email protected] $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
KERNEL=="ub*", SUBSYSTEMS=="usb",       ACTION=="add",  PROGRAM="/bin/systemd-escape -p [email protected] $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
KERNEL=="sd*",                          ACTION=="remove",       RUN+="/usr/share/usbmount/usbmount remove"
KERNEL=="ub*",                          ACTION=="remove",       RUN+="/usr/share/usbmount/usbmount remove"

nano /etc/systemd/system/[email protected]

ExecStart=/usr/share/usbmount/usbmount add
Asrock J4205 powered by Ubuntu 18.04 and KODI
As I wrote in the beginning, there is no package usbmount in Debian Stretch. Probably working for most other distros.
You can try to build usbmount from github:
apt-get install debhelper
git clone
cd usbmount
dpkg-buildpackage -us -uc -b
cd ..
dpkg -i usbmount_0.0.24_all.deb
Asrock J4205 powered by Ubuntu 18.04 and KODI
Sorry for the delay, I finally found time to do it. usbmount should now be installed.

Schenckmeier, could you please help me one more time? As I experienced, the adjustments from your first post are still necessary, of course. My USB stick uses exfat – could you please tell me the content of /etc/usbmount/usbmount.conf once again? Or is it absolutly easy, that is just add exfat to the first line “FILESYSTEMS”?
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
USB automount not working for Debian Stretch00