Videos section displays umounted partitions/folders in LibreELEC v7.90.002 ALPHA

  • What is the version of LibreElec?

    LibreELEC v7.90.002 ALPHA on RaspberryPi 1.

    What was the activity?

    • Add .config/autostart.sh with below content such that on startup
      all mounted partitions are umounted
      only 2 partitions of external HDD partitions are mounted read only
      all other partitions if exists are not mounted at all
      Bash
      #!/bin/sh
      (
       sleep 30; \
       umount /var/media/*; \
       mount -r /dev/sda1 /var/media/Vol1; \
       mount -r /dev/sda2 /var/media/Vol2 \
       ) &
    • Power on RaspberryPi 1 to boot LibreELEC v7.90.002 ALPHA.
    • Wait for a minute.
    • Open File Manager.
    • Return to main menu.
    • Open Videos.


    What was observed?

    • In File Manager only Vol1 and Vol2 are displayed.
    • In Videos Vol1, Vol2, and Vol3 are displayed.


    What was expected?

    Vol3 should not be displayed in Videos as it is not mounted.

    How was it behaving in earlier version?

    In LibreELEC v7.0.2 Videos section was not displaying Vol3 as it was not mounted.

    Edited once, last by hsehdar (July 6, 2016 at 1:22 AM).

  • FYI: None of the partitions are scanned by Kodi for library maintenance.


    [hr]
    Does sleep 30 in autostart.sh cause this behaior? I guess, Videos caching directory structure before umount is executed.
    [hr]
    Reduced the sleep to 10 seconds in autostart.sh and Videos is showing only Vol1 and Vol2 partitions which are actually mounted.

    Edited once, last by hsehdar (July 6, 2016 at 4:20 AM).

    • Official Post
    Code
    cp /usr/lib/udev/rules.d/95-udevil-mount.rules /storage/.config/udev.rules.d/95-udevil-mount.rules
    nano /storage/.config/udev.rules.d/95-udevil-mount.rules

    ^^ append the partition names you do not want mounted to the list, see udevil: prevent noobs partitions from auto-mounting by chewitt · Pull Request #386 · LibreELEC/LibreELEC.tv · GitHub and reboot. The new modified file will be used instead of the embedded one. If you have not named the partitions, name them.

  • Code
    cp /usr/lib/udev/rules.d/95-udevil-mount.rules /storage/.config/udev.rules.d/95-udevil-mount.rules
    nano /storage/.config/udev.rules.d/95-udevil-mount.rules

    ^^ append the partition names you do not want mounted to the list, see udevil: prevent noobs partitions from auto-mounting by chewitt · Pull Request #386 · LibreELEC/LibreELEC.tv · GitHub and reboot. The new modified file will be used instead of the embedded one. If you have not named the partitions, name them.

    Thanks. Not just umounting, I would like to mount external HDD as read only. How to get that going? Intention was to use udev and later found autostart was easy to maintain in .config directory.