LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-10-2010, 09:53 PM   #1
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Rep: Reputation: 0
Can't get mount to work in /etc/init.d/rc.local or fstab


I'm running XBMC media center which is built on Ubuntu and I'm trying to mount a network share, but I can't seem to automate it. If I manually run:

Code:
mount -t cifs -o file_mode=0777,dir_mode=0777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  /home/kevin/.xbmc/userdata/Thumbnails
The mount is created and everything works fine. But obviously the mount eill be lost on the next boot. A few months back, when I was running a previous version of XBMC and first instructed on how to do this, I was told to put that command in /etc/init.d/rc.local so the mount would automatically be created at boot. I did and it worked.

The other day I upgraded to a new XBMC build (which is built on the newer Lucid Ubuntu) and while the same command creates the mount, putting it in /etc/init.d/rc.local does not create it on boot. Someone suggested the fstab was the better place to create the mount. So I inserted the following in /etc/fstab:

Code:
//192.168.1.20/disk7/XBMC_thumbs/Thumbnails     /home/kevin/.xbmc/userdata/Thumbnails   cifs    file_mode=0777,dir_mode=0777 0 0
That doesn't work either. What am I doing wrong and how can I get this mount auto-created on boot?
 
Old 07-11-2010, 06:06 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
When booting, fstab is read before the network is up. You can't mount a network share until the network is working, so you have to delay the mounting using _netdev
See this post.
 
Old 07-11-2010, 12:40 PM   #3
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
That didn't work either. Here is my fstab after adding _netdev (it's the last line):

Code:
kevin@XBMCLive:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=7b446e3a-7a26-4a0d-bd96-d350956cb05e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=213a9296-5449-4f28-a912-704e5999b504 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
# Mount for central thumbnail cache for XBMC
//192.168.1.20/disk7/xmbc_thumbs/Thumbnails  /home/kevin/.xbmc/userdata/Thumbnails   cifs   _netdev,file_mode=0777,dir_mode=0777 0 0

Last edited by Bozrdang; 07-11-2010 at 12:44 PM.
 
Old 07-15-2010, 07:37 PM   #4
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Nobody has any other ideas on this?
 
Old 09-01-2010, 10:09 AM   #5
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,008

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
um, for my xbmc-live i put this in /etc/rc.local
Code:
sshfs schneidz@192.168.1.25:/media/win/stuff /home/xbmc/hyper &

Last edited by schneidz; 09-01-2010 at 10:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount dvd and floppy dosent work in the /etc/fstab Elnegro8 Linux - Hardware 5 01-15-2009 02:08 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! TruANTOlogy Ubuntu 8 06-20-2006 08:00 AM
Why a FSTAB entry will mount using -a switch but will not mount automatically at boot mjen Linux - Newbie 3 05-19-2004 07:45 AM


All times are GMT -5. The time now is 05:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration