[WORKAROUND] Shares not mounting at startup.

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[WORKAROUND] Shares not mounting at startup.

Postby spaceman on Sun Mar 03, 2013 1:53 pm

This is irritating, not least as all my other distro's are working correctly (except Sabayon :wink: ).

This is a line from my /etc/fstab/ file:
Code: Select all
//192.168.1.10/spaceman  /media/spaceman  cifs  credentials=/root/.smbcredentials,file_mode=0777,dir_mode=0777  0  0


Workaround for this problem is to open a terminal and issue:
Code: Select all
sudo mount -a


So you can conclude from this that cifs-utils are installed, the mount point(s) (/media/spaceman; /media/...) are created, the /root/.smbcredentials file exists and contains the correct username/password combination. So why won't LMDE MATE mount the shares like Linux Mint 14 'Nadia' MATE and Debian 6.0.6 Squeeze (et al, except Sabayon) are?

Thoughts?
Last edited by spaceman on Mon Mar 04, 2013 9:53 am, edited 1 time in total.
Linux Mint 16 'Petra' x64 ~ Asus Sabretooth 990FX ~ AMD Phenon Quad Core 965 Black Edition~ nVidia GTX 460 768MB ~ 16 GB DDR3 RAM
User avatar
spaceman
Level 1
Level 1
 
Posts: 46
Joined: Sun Jan 08, 2012 5:31 pm

Linux Mint is funded by ads and donations.
 

Re: Shares not mounting at startup.

Postby altair4 on Sun Mar 03, 2013 2:25 pm

I don't know why this is happening to you and I don't follow or use LMDE but I can offer a suggestion:

Create a script:
Code: Select all
gksu gedit /etc/network/if-up.d/fstab

With this content:
Code: Select all
#!/bin/sh
mount -a

Save the file, exit gedit, and back in the terminal make the file executable:
Code: Select all
sudo chmod +x /etc/network/if-up.d/fstab


You are basically giving in to the dark side and institutionalizing the "sudo mount -a" workaround at boot. Placing the script in if-up.d makes sure it's executed only after the network is up. This happened in Ubuntu and Ubuntu-based Mint for a couple of releases as it appeared that the instructions in fstab were being executed before the network was up and the samba related stuff failed.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5813
Joined: Tue Feb 03, 2009 10:27 am

Re: Shares not mounting at startup.

Postby spaceman on Mon Mar 04, 2013 9:47 am

Thanks altair4, that works a treat. It is a nasty workaround though, should I report this as a bug?

Nevertheless, this does work and is completely painless so thanks. I'm off to try to fix Sabayon with it now. If it works I'll link to this post from their forums where my question about this has had 114 views over the month it's been sitting there...unanswered. :lol:
Linux Mint 16 'Petra' x64 ~ Asus Sabretooth 990FX ~ AMD Phenon Quad Core 965 Black Edition~ nVidia GTX 460 768MB ~ 16 GB DDR3 RAM
User avatar
spaceman
Level 1
Level 1
 
Posts: 46
Joined: Sun Jan 08, 2012 5:31 pm

Re: [WORKAROUND] Shares not mounting at startup.

Postby kwisher on Mon Mar 04, 2013 3:14 pm

I've seen this issue on other debian based distro's and never investigated it fully. I'm not sure if it has to do with kernel versions or what??
The instructions suggested Windows XP or better, so I installed Linux :)
User avatar
kwisher
Level 5
Level 5
 
Posts: 634
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: [WORKAROUND] Shares not mounting at startup.

Postby abickerton on Thu Mar 07, 2013 5:44 pm

I ran into this after an nfs update some time ago, I switched to not always mounting the shares.
One question to ask yourself is, Do I really need to mount this stuff when I'm not logged in?
In my case the answer was no.

I have gdm mount the shares at login and logout. This approach would also work in classroom environment if that's what you want to do :-)

In fstab, define the shares you want users to be able to mount & unmount.
Code: Select all
192.168.150.2:/c/randomcrap/   /home/xxx/Downloads/keep   nfs   rw,user,noauto   0   0


Add the mount command to /etc/gdm3/PreSession/Default to add the share at login.
Code: Select all
mount /home/$USER/audio


Add the unmount to /etc/gdm3/PostSession/Default to remove the share on logout.
Code: Select all
umount /home/$USER/audio
abickerton
Level 1
Level 1
 
Posts: 18
Joined: Tue Jul 10, 2012 3:01 pm

Re: [WORKAROUND] Shares not mounting at startup.

Postby kwisher on Fri Mar 08, 2013 12:29 am

abickerton, excellent suggestion. I will have to give this a try sometime.
The instructions suggested Windows XP or better, so I installed Linux :)
User avatar
kwisher
Level 5
Level 5
 
Posts: 634
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 0 guests