[WORKAROUND] Shares not mounting at startup.

Archived topics about LMDE 1
Forum rules
User avatar
spaceman
Level 1
Level 1
Posts: 45
Joined: Sun Jan 08, 2012 5:31 pm

[WORKAROUND] Shares not mounting at startup.

Postby spaceman » 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

altair4
Level 17
Level 17
Posts: 7895
Joined: Tue Feb 03, 2009 10:27 am

Re: Shares not mounting at startup.

Postby altair4 » 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.

User avatar
spaceman
Level 1
Level 1
Posts: 45
Joined: Sun Jan 08, 2012 5:31 pm

Re: Shares not mounting at startup.

Postby spaceman » 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

kwisher
Level 5
Level 5
Posts: 738
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: [WORKAROUND] Shares not mounting at startup.

Postby kwisher » 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 :)

abickerton
Level 1
Level 1
Posts: 23
Joined: Tue Jul 10, 2012 3:01 pm

Re: [WORKAROUND] Shares not mounting at startup.

Postby abickerton » 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

kwisher
Level 5
Level 5
Posts: 738
Joined: Wed Mar 05, 2008 12:54 pm
Location: Greentown, Indiana USA

Re: [WORKAROUND] Shares not mounting at startup.

Postby kwisher » 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 :)

Gannet
Level 1
Level 1
Posts: 9
Joined: Mon Aug 25, 2014 2:21 pm

Re: [WORKAROUND] Shares not mounting at startup.

Postby Gannet » Mon Oct 06, 2014 7:07 am

Hi - this post worked for me - http://forums.linuxmint.com/viewtopic.php?f=42&t=144997. At the moment my passwords are in the /etc/auto.sambashares file. I'll do the rest of the hack when I get a "round tuit".


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 0 guests