autostart.sh

  • Hi guys,

    i need libreelec to automount smb drive after startup


    is this sytnax correct? and where exactly is autostart.sh located in LE?

    sleep 3

    (
    mount -t cifs -o username=username,password=password //192.168.0.140/admin/ZONE/REC .kodi/userdata/REC
    )
    &

    thx ;)

  • You can check the syntax by simply running the mount command directly in the CLI.
    If the mount is successful, there will be no (error) output.

    The autostart.sh file is to be created in the "/storage/.config" folder.

  • thx for you replies,
    @kolujumthe path is good. I just didnt know if this is all i have to type in file autostart.sh
    @chwitt i tried it. edited as was written. install it. command line said that symbolic link was created but. when copied file in libreelec mounted storage it wasnt on my nas. i had to manualy mount it.

    doing smething wrong?

    i renamed the file
    storage-Recordings.mount

    Edited once, last by milan53 (September 13, 2016 at 2:24 PM).

  • Hello all.

    I'm new to LibreElec and Linux in general and have been attempting to automount NFS shares on my Drobo 5N NAS and came across this thread. In the past on Rasbperry Pis, I have simply used a modified fstab but, as the LibreElec filesystem is read-only as mentioned, I thought I'd give this method a try. Like Milan53, I attempted to use the above example to create a .mount file and initially saw a message about sym links being created but cannot see the contents of my NAS share in the folder I created. I wonder if someone might assist with a very patient step by step on how to successfully navigate this method of automounting NFS shares.

    Thanks in advance.

    Duke


  • "systemctl enable something.mount" just allows the mount to be run at boot, so either reboot or run "systemctl start something.mount"

    Thank you lrusak.

    That's got it sorted. Much appreciated. That was the very step I needed to move forward. From there, I had to sort out why it was failing but at least the failure gave me the directions I needed to continue. I had rebooted before but it hadn't seemed to work.

    In any case, It is working now and I can see the contents of the NAS in the mounted folders so thank you once again.

    One last question.. on a system without a read-only file system, is there any advantage to mounting network shares with this method over modifying the fstab?

    Duke

  • still not working for me :/
    when i used command systemctl enable storage-recordings.mount it has created symobolic linc, but when i used command systemctl start it says this
    "job for storage-recordings.mount failed.
    see "systemctl status storage-recordings.mount" and "journalctl -xe" for details

    reboot didnt work as well. I still have mount it manualy


  • still not working for me :/
    when i used command systemctl enable storage-recordings.mount it has created symobolic linc, but when i used command systemctl start it says this
    "job for storage-recordings.mount failed.
    see "systemctl status storage-recordings.mount" and "journalctl -xe" for details

    reboot didnt work as well. I still have mount it manualy


    In my case, I ran both those commands to determine the problem was in the "Options=" section of my .mount file. I ended up clearing it entirely to get it working. Did you try running those commands to get some details of the problem?

    Duke

  • truht is I wasnt able to find any details of the problem. /where is the location of the file?/
    I tried to errase the "options=" used user name for LE then my NAS, default, i feel stupid that i cant get it work.


  • truht is I wasnt able to find any details of the problem. /where is the location of the file?/
    I tried to errase the "options=" used user name for LE then my NAS, default, i feel stupid that i cant get it work.

    I wouldn't be too hard on yourself. These things seem like they should be simple/easy but they rarely are in my experience. If you feel stupid then you are in good company with me. ;) I think I just got lucky with my attempts because you had basically laid the ground work for me in your example .mount file.

    I am no expert but would like to help if I can. So running "systemctl status storage-recordings.mount" or "journalctl -xe" didn't give you any indication of where the errors were? That's odd. I don't quite understand what you mean by "/where is the location of the file?/" Can you provide some more details, please?

    Duke

  • Update info. maybe it can help anybody not to make the same mistake.

    I had wrong path on my LE. the right path for me was

    /storage/.kodi/userdata/REC

    now its finally working. thank you all for help

    ======================================================
    i am not expert as well :D
    and i didnt know that all i have to do is type systemctl status :D never mind.
    I started all over again.
    I want to mount
    192.168.0.140/admin/ZONE/REC (what)
    to
    /storage/Userdata/REC (where)


    there is password on my NAS so I presume I have fill that option in.

    file name is going to be "storage-Userdata-REC.mount" ?
    when I followed this steps nothing has mounted :/

    Edited once, last by milan53 (September 22, 2016 at 4:14 PM).


  • Update info. maybe it can help anybody not to make the same mistake.

    I had wrong path on my LE. the right path for me was

    /storage/.kodi/userdata/REC

    now its finally working. thank you all for help

    Great to hear, milan53. Yes, paths and syntax (including case) is everything with these issues. Glad you've finally got it sorted out.

    Duke