[WORKAROUND] Shares not mounting at startup.

Archived topics about LMDE 1 and LMDE 2
Locked
spaceman

[WORKAROUND] Shares not mounting at startup.

Post by spaceman »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: Shares not mounting at startup.

Post by altair4 »

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.
spaceman

Re: Shares not mounting at startup.

Post by spaceman »

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:
kwisher

Re: [WORKAROUND] Shares not mounting at startup.

Post by kwisher »

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??
abickerton

Re: [WORKAROUND] Shares not mounting at startup.

Post by abickerton »

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

Re: [WORKAROUND] Shares not mounting at startup.

Post by kwisher »

abickerton, excellent suggestion. I will have to give this a try sometime.
Gannet

Re: [WORKAROUND] Shares not mounting at startup.

Post by Gannet »

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".
Locked

Return to “LMDE Archive”