Search code examples
ubuntumountnfssynology

Mount NFS on ARM based ubuntu


I have a Synology NAS and I created a NFS share. I was using the official tutoral https://www.synology.com/de-de/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS

But now I cannot mount the NFS share on my ARM based ubuntu.

root@lubuntu:~# mount 192.168.1.100:/volume1/Mediacenter /mnt/Mediacenter
mount.nfs: No such device

I tried the following from https://wiki.archlinux.org/index.php/NFS/Troubleshooting#Client-side_issues

lsmod | grep nfs

Output Empty

root@lubuntu:~# modprobe nfs
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/3.10.0/modules.dep.bin'

Can anybody help me please?


Solution

  • I have had a simlar problem before, the solution I found was to actually mount the share at boot. This is done within fstab on Ubuntu. However, the best way to do this is to install 'cifs' (Common Internet File System), this allows you to mount Samba shares, and other Network file systems.

    You can install CIFS using apt-get

    sudo apt-get install cifs-utils
    

    Then once installed you must edit '/etc/fstab' and add this line to the bottom of the file:

    //ip_of_share/share_name /mount/location cifs defaults 0 0
    

    This will allow the share to be mounted. If you are required to log in to the share then you can do this:

    //ip_of_share/share_name /mount_location cifs credentials=/location,defaults 0 0
    

    If you are required to log into the share, then you must add a credentials file. You can do this by using creating a new file using nano or your favorite editor:

    sudo nano /location/of/credentials
    

    Once created, the username and password nodes must be added:

    username=username_of_share_user
    password=password_of_share_user
    

    To make your file credentials file as secure as possible you can use chmod to close the files access down to make it read only:

    sudo chmod 400 /location/of/credentials
    

    If you would like the share to be mounted under a specific user and group, you can use:

    //ip_of_share/share_name /mount_location cifs credentials=/location,uid=user_id,gid=group_id,defaults 0 0
    

    Then finally, you can either restart, or do:

    sudo mount /mount/location
    

    I hope this helps.