Discussion

help me to mount a windows share

9 2595
Hi All

I got a banana pro and installed bananian on it. everything working fine.

I have a requirement to permanent mount a network shared folder (windows 7 folder) with banana pro.

I tried few methods described in Internet none has worked so far.

I managed to map same drive with my Ubuntu OS. so I know network share is OK.

Can somebody guide me how can I mount a network share on bananian OS.


Thanks
tkaiser  
You probably need cifs-utils first. The code fragments here should be sufficient:

http://forum-bananapi.de/Thread-NAS-Freigabe-auf-dem-Pi-mounten (or via google translate)

Thank you for directing me correct way,

fool me I haven't installed cifs package that was the my first mistake

instant mapping worked as described in the given link

but permanent mapping didn’t work and looks like some guys had the same issue what I got

I added following line to /etc/fstab a

//192.168.2.100/incoming /download/incoming cifs -o user=xxxx,password=xxxx

Then saved it and executed mount -a

but it gives following error

line x in /etc/fstab is bad

I managed to get it working by adding following line to /etc/fstab

//192.168.2.100/incoming /download/incoming cifs uid=0,gid=0,credentials=/root/.credentials,iocharset=utf8,sec=ntlm 0 0

here uid 0 is root but can use any user

following are in the /root/.credentials file

username=xxxx
password=xxxx

xxxx are windows username and password,

Hope this will help to somebody as well






I am having the same problem. I have cifs-utils installed. My fstab line looks like this:
//192.168.1.7/3DPrintingFiles /mnt/3Dprint -t cifs -o credentials=/root/.credentials 0 0
If I remove the 2 zeros at the end and execute this from the command line, it mounts. However, with the line as shown in fstab, executing mount -a at the command line I get "line 4 in /etc/fstab is bad" message. I
have tried with various combinations of uid,gid,iocharset, and sec, makes no difference. Any ideas what's wrong?

@jmrobert48: You need to remove the
-t
and
-o
from your fstab file, so your entry looks like this:
  1. //192.168.1.7/3DPrintingFiles /mnt/3Dprint cifs credentials=/root/.credentials 0 0
Copy the Code

The o and t switches are only used when you run mount from a command line.

I made the changes you suggested and when entering 'mount -a' at the command prompt, it does mount, but it still won't mount when booting. I again have to type 'mount -a' at the command prompt.

Hmm... one issue that might occur is that while fstab entries are mounted, the network is not up and running yet. You might try and add the option
  1. _netdev
Copy the Code
to your fstab entry, but I have never tried that with cifs/smb shares (it's supposed to make the mount process wait for the network to be ready before trying to mount a network share).

Another way you might try is adding the option
  1. noauto
Copy the Code
to the options in that line to prevent that entry from being mounted automatically and then add a
  1. mount /mnt/3Dprint
Copy the Code
to your /etc/rc.local start script (always make additions before the exit 0 line).

Oh and you might as well check /var/log/syslog for any output related to your smb/cifs share. Maybe that gives you an idea of what's happening.

Thanks for your help, but neither of your suggestions worked. I'm running Bananian 15.04 r01 on a Banana Pro, not sure if that matters. In rc.local I inserted a command to turn off the blue led before the mount command and a command to turn off the green led after the mount command. I did that because no errors are listed in the syslog file. The green led continues flashing Changing the mount command to mount -a in rc.local, the green led stops flashing, but the mount doesn't happen. I'm going to set up a Raspian boot and see if I can get that to work.

Thanks again for your help. I switched to Raspbian, and adding 'noauto' to fstab and a mount command to rc.local works. It doesn't work with Bananaian though.

You have to log in before you can reply Login | Sign Up

Points Rules