View previous topic :: View next topic |
Author |
Message |
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Fri Sep 11, 2015 7:58 am Post subject: Mount WIndows share permanently: |
|
|
Hi,
Hope someone can help me with this;
I can mount these shares without a problem while the system is running.
If I unmount them and then add the applicable lines to /etc/fstab and run "mount -a", the action is successful.
# Network Share: Physical machine
//llabmw7/d /home/[username]/Desktop/shareP cifs credentials=/home/[username]/.smbcredentials,iocharset=utf8,sec=ntlm,_netdev 0 0
# Network Share: Virtual machine
//DC1/share /home/[username]/Desktop/share cifs credentials=/home/[username]/.smbcredentials,iocharset=utf8,sec=ntlm,_netdev 0 0
* GENTOO system is virtual and running on vm workstation 10
The problems start when I reboot GENTOO - after POST runlevel3, the system errors with "mount error 101 blablabla"
I've had a look round the net & nothing I've come across has solved the problem. I'm still new to GENTOO and Linux in general.
What would be the best practice when it comes to NET shares?
Thanks in advance
kkinkouu |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Fri Sep 11, 2015 10:34 am Post subject: |
|
|
Network is unreachable at that point
Can you post "rc-update show" ? |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Wed Sep 16, 2015 11:31 am Post subject: |
|
|
I just booted of a live Gentoo ISO and mounted the VM system; then i commented out the additional net shares, rebooted the system and everything was fine.
Some users have suggested that i build a scripted and place it into /etc/local.d/ - so on login the scripted is run mounting the shares needed.
this is more of a work around than a fix, but it does the job i suppose
Here's the output regarding the "rc-update show"
Code: | gentoo_vm XXXXX # rc-update show
alsasound | boot
binfmt | boot
bootmisc | boot
consolekit | default
cronie | default
devfs | sysinit
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
procfs | boot
root | boot
samba | default
savecache | shutdown
sshd | default
swap | boot
swapfiles | boot
sysctl | boot
sysfs | sysinit
syslog-ng | default
termencoding | boot
tigervnc | default
tmpfiles.dev | sysinit
tmpfiles.setup | boot
udev | sysinit
urandom | boot
xdm | default
xrdp | default |
Let me know your thoughts!
Code tags added by NeddySeagoon to preserve original format |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Sep 17, 2015 10:23 am Post subject: Re: Mount WIndows share permanently: |
|
|
kkinkouu wrote: | The problems start when I reboot GENTOO - after POST runlevel3, the system errors with "mount error 101 blablabla" |
Can we get the real blablabla part? |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Fri Sep 18, 2015 4:20 pm Post subject: |
|
|
blablabla part - "mount error(101) network is unreachable" |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Thu Sep 24, 2015 9:24 pm Post subject: |
|
|
I haven't been able to find a solution regarding the original question, but think it lies somewhere in the topic - "restructuring the rc boot order" - in such a way, that the network stack boots up before the fstab config; just speculation though and haven't pursued this avenue yet.
Work-around: solution
Create a script file in the following location "/etc/local.d/" that looks something like the below:
#!/bin/bash
#
# Network Share: Physical machine
SERVER_IP="***.***.***.***"
HOSTNAME="hostname1"
SHARE_NAME="d"
CREDENTIALS="/home/[username]/.smbcredentials"
DOMAIN="WORKGROUP"
sudo mount //hostname1/d -o credentials=$CREDENTIALS,dom=$DOMAIN /home/[username]/Desktop/shareP
#
# Network Share: Virtual machine
SERVER_IP="***.***.***.***"
HOSTNAME="hostname2"
SHARE_NAME="share"
CREDENTIALS="/home/[username]/.smbcredentials"
DOMAIN=DOMAIN.DOMAIN"
sudo mount //hostname2/share -o credentials=$CREDENTIALS,dom=$DOMAIN /home/[username]/Desktop/share
Now create a file ".smbcredentials" in example location - "/home/[username]/" with the following credentials needed for each share:
# Local Account:
username=[username]
password=**************
# Domain Account:
username=[domain\username]
password=**************
The specified username must be an NTFS account name either local or domain orientated.
Now make sure "local" is started in "rc" by running the following command:
gentoo_vm # rc-update add local default
gentoo_vm # rc
Good to go!
kkinkouu[/code] |
|
Back to top |
|
|
|