Mount Network Shares using FSTAB - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Mount Network Shares using FSTAB (/showthread.php?tid=86435) |
Mount Network Shares using FSTAB - DejaVu - 2010-11-30 This is doing my head in. I've tried reading all the guides and information others have given, but my setup will not mount my shares. My Windows PC - 192.168.0.11 or DejaVu-PC is definitely sharing my drives out. I can mount them in Putty with - sudo smbmount //192.168.0.11/drive1 /home/xbmc/mnt/drive1 But with this in FSTAB - nadda - 192.168.0.11/drive1 /home/xbmc/mnt/drive1 ntfs defaults,auto 0 0 I've also tried nfs instead of ntfs, still the same. What line do I need to put in FSTAB to automount my shares? I've also tried using the smb://192.168.0.11/drive1 option in XBMC, but it is no good to me as I need to give Sickbeard access to these NTFS Shares. Please help. Appreciated as always. - uomiarz - 2010-11-30 This is how I do it. I create script in my home dir (can be wherever) with something like that: Code: #/bin/bash And then I call this script when system starts: Code: mp@nexus:~$ cat /etc/rc2.d/S99smb-startup Make sure both scripts are executable. - DejaVu - 2010-11-30 Can this be done if there is no password for the shares? It asks everytime when using sudo smbmount //192.168.0.11/drive1 /home/xbmc/mnt/drive1 and I just press Enter! - uomiarz - 2010-11-30 Sure I don't see why not. This was just copy/paste from my setup. - DejaVu - 2010-11-30 No go. I've made a script called /home/xbmc/mounting.sh Code: #/bin/bash And a script in /etc/init.d/mounting.sh which is added to the rc.d so it autoloads at boot. Code: #/bin/bash But my share directory's are still empty. - drzoo2 - 2010-11-30 DejaVu77 Wrote:Can this be done if there is no password for the shares? Your problem with fstab is the ntfs. This is a network share. The file system is samba not ntfs. If this was a local drive then you would specify ntfs. In your case replace it with smbfs ex Code: //ntserver/docs /mnt/samba smbfs username=docsadm,password=D1Y4x9sw 0 0 z - DejaVu - 2010-11-30 So in FStab //192.168.0.11/drive1 /home/xbmc/mnt/drive1 smbfs defaults, auto, 0 0 Should do it with no need for a user and pass? -EDIT- Nope. No go still. Here's my entire fstab Code: # /etc/fstab: static file system information. - uomiarz - 2010-11-30 I am so sorry. You need to remove # signs from each line when it says smbmount... so this is how it should look like Code: #/bin/bash # makes it a comment --------------------------------------- and for smbfs to work in fstab you will need Code: sudo apt-get install smbfs hope it helps - DejaVu - 2010-11-30 Does not look like I'm meant to be able to do this - Code: Last login: Tue Nov 30 00:43:20 2010 from [b]192.168.0.11[/b] I'll retry the script way. - uomiarz - 2010-11-30 OK According to this http://ubuntuforums.org/showthread.php?t=283131 you should use cifs and not smbfs. Read it and you should be able to get it to work with fstab. My problem was that network was not up instantly upon bootup. That is why originally I have a 5 seconds delay in my mounting script (sleep 5) I am off to bed , good luck. - DejaVu - 2010-11-30 New attempt = ----------------------------------------------------------- cd ~ sudo nano /home/xbmc/mountdrives Code: #/bin/bash sudo nano /etc/init.d/mountdrives = Code: #/bin/bash sudo update-rc.d -f mountdrives defaults Adding system startup for /etc/init.d/mountdrives ... /etc/rc0.d/K20mountdrives -> ../init.d/mountdrives /etc/rc1.d/K20mountdrives -> ../init.d/mountdrives /etc/rc6.d/K20mountdrives -> ../init.d/mountdrives /etc/rc2.d/S20mountdrives -> ../init.d/mountdrives /etc/rc3.d/S20mountdrives -> ../init.d/mountdrives /etc/rc4.d/S20mountdrives -> ../init.d/mountdrives /etc/rc5.d/S20mountdrives -> ../init.d/mountdrives sudo chmod a+x /etc/init.d/mountdrives sudo chmod a+x /home/xbmc/mountdrives ----------------------------------------------------------- Given up for the night, been trying to do this since 12:30am - now 5am! Thanks for your help though guys. Off to bed, hope I dream how to solve it - but doubtful! - boykster - 2010-11-30 I use fstab to mount my network shares, not sure why yours are giving you problems. My shares are smb shares on another linux machine, but that shouldn't make a difference. Here's my fstab entry for my share: Code: //titan/Movies /home/boykster/videos smbfs auto,username=boykster,password=,uid=500,umask=000,user 0 0 - DejaVu - 2010-11-30 I am now totally baffled... Quote:xbmc@XBMCLive:~$ sudo mount -a mount -a Could not resolve an address. 2 seconds later, smbmount can! WTF? I'm going to have to do this manually until I can work out what is going on...!?! - DejaVu - 2010-11-30 boykster Wrote:I use fstab to mount my network shares, not sure why yours are giving you problems. My shares are smb shares on another linux machine, but that shouldn't make a difference. Here's my fstab entry for my share: OMG I'm not even sure what's done it. But that worked!! K+ to all for all your help!! My new shiny FSTAB is - Code: //dejavu/drive1 /home/xbmc/mnt/drive1 smbfs auto,username=dejavu,password=,uid=500,umask=000,user 0 0 It's either the IP Address it did not like or the 'username=dejavu,password=,uid=500,umask=000,user 0 0' at the end. But it's now working! Thanks guys!! Hope this helps others in the future! - boykster - 2010-11-30 Excellent! Glad that worked. |