1

It is really strange but I am not able to find the problem. In Ubuntu 14.06 all works fine in the same way and with the same files. It is not possible in Ubuntu 16.04 to mount an ntfs file system via udev rules. The output after the system trying to mount is:

d?????????  ? ?        ?           ?            ? Media/

but happens any time if I use the udev rules. If I mount the file system manually or by script and cron job it will work. For me it has something to do with permissions but I am not sure where to search even knowing that all was working fine with ubuntu 14.04.

The kernel version is: 4.4.0-31 The udev rule is:

KERNEL=="sd?1", SUBSYSTEMS=="usb", ATTRS{serial}=="222228251A0D", SYMLINK+="mediacenter", ACTION=="add", RUN+="/home/user/mount_filesystem.sh"

The simple script file executed is:

#!/bin/bash
mount UUID=0B1EA330201EA249 /media/Media

sleep 5

service minidlna restart

Now my question:

Where is my problem if it works perfect with Ubuntu 14.04 or if I start the script manually or every minute by cron.

1 Answer 1

0

First, correct the rule part order MATCH'es then ACTION's

KERNEL=="sd?1", SUBSYSTEMS=="usb", ATTRS{serial}=="222228251A0D", SYMLINK+="mediacenter", ACTION=="add", RUN+="/home/user/mount_filesystem.sh"

to

KERNEL=="sd?1", SUBSYSTEMS=="usb", ATTRS{serial}=="222228251A0D", ACTION=="add", SYMLINK+="mediacenter", RUN+="/home/user/mount_filesystem.sh"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .