Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-10-2010, 10:53 PM   #1
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:

mount -t cifs -o file_mode=0777,dir_mode=0777 //  /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:

//     /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, 07:06 AM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
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, 01:40 PM   #3
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):

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
//  /home/kevin/.xbmc/userdata/Thumbnails   cifs   _netdev,file_mode=0777,dir_mode=0777 0 0

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

Original Poster
Rep: Reputation: 0
Nobody has any other ideas on this?
Old 09-01-2010, 11:09 AM   #5
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,289

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
um, for my xbmc-live i put this in /etc/rc.local
sshfs schneidz@ /home/xbmc/hyper &

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


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 03:08 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! TruANTOlogy Ubuntu 8 06-20-2006 09: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 08:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 PM.

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