Problem with udevil and mount

  • Hello!

    To be clear i do not know my way around linux, even thou i have been running a htpc since 2008 with xbmcbuntu

    But to my problem, this new thing with not using fstab is causing me problems.

    It automounts to "ugly" name folders i can live with that but would prefere to be able to change it.

    Now to my real problem!

    udevil mounts my 3 sata drives strange, they show up i Kodi not as disks but something else. If i start UPnP the disks are shared from the root. I am used to Add source then browse to my disk and then choose folder, for example /media/HDD1/Movies/ and then just Movies is shared through UPnP and i cant get that to work.

    If i manualy unmount and mount using "mount" it works but as soon as i rebbot it is all gone even the folders i create in /media/

    I do not want my family to have acces to everything on my disks just my movie/tv/kids folders.

    I have googled and i really dont know what i am suposed to search for.

    How? please help!

    /best regards SKIBBE

  • It automounts to "ugly" name folders i can live with that but would prefere to be able to change it.

    Create disk labels and /var/media/MYLABEL will be used instead of /var/media/0023-554320 or whatever UUID is used.

    Not really sure what the second Q is about. You should be able to create sources named however you like against locally mounted (nicely labeled) drive mount points.

  • Okey i will try to explain!

    First image shows how the shares look default when booting. *Notice the USB-icons*

    Second image shows me having umount sdc1 and mounting it with mount /var/media/HDD2/ and then adding source /var/media/HDD2/Movies *Notice the disk icon* <-- this i want


    If i add source from the USB-icon mounts by udevil i too get the disk icon but i still have the disks as usb-icons and that means they show up per default when you share your libary with UPnP + the share i created from selected disk.

    The icons give me the feeling my harddrives are treated as external usb-drives, not internal hdd? but that dont add up, why would Kodi auto share a usb-disk from the root folder by default?


    Best Regards SKIBBE

  • I'm not 100% sure of all points, but udevil knows they are USB drives and this inherently means they are removable block storage devices unlike e.g. SATA drives which are treated as non-removable, and it mounts them to a known "auto-mount removable block storage" location. Those differences are all documented/registered in the udev database which is queried by apps; and those apps may choose to show different icons or handle them differently based on different properties, e.g. bus type, mount location. I don't use UPnP so can't say what Kodi does with removable vs. internal drives, but there's probably info in the Kodi wiki or you might need to ask Q's in the Kodi forum.

    To prevent auto-mounting you'll need to clone the default rules file to /storage/.config/udev.rules.d/95-udevil-mount.rules and then modify it to create exceptions for specific drives using UUIDs/LABELS or such. You can then create alternative mounts e.g. using a systemd service that runs ExecStart commands to mount things as you need them.