LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help required!!!! Mounting a network drive at Boot up (https://www.linuxquestions.org/questions/linux-networking-3/help-required-mounting-a-network-drive-at-boot-up-352267/)

YaAqoB 08-11-2005 02:08 PM

Help required!!!! Mounting a network drive at Boot up
 
Hello.
I have a file server running Ubuntu and a workstation dual booting with XP Pro and Ubuntu.
With XP i have mapped the network drives & and can read/write no worries what so ever. Easy...
With Ubuntu I have added the mount info into my fstab file........but when ever I boot into Ubuntu none of my icons appear, it does not mount the network drive and after about 3 minutes Ubuntu slows down to the point where I have to hit the reset button.
Now if I start ubuntu, edit the fstab file and comment out the network drive line and then save/restart the computer starts Ubuntu sweet as no worries.
It runs fine.
I then edit the fstab file, uncomment the network drive entry, save and then go:
sudo mount -a
it mounts the network drive and every thing runs mint as...... untill I have to restart where I have to do the above process again.
I can't see why it fails on bootup but then runs fine if you manually mount it after boot.
Below is my fstab contents:
Please Help!!!

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hda1 /mnt/WindowsDrv ntfs umask=0222 0 0
/dev/hdb1 /mnt/WindowsApps ntfs umask=0222 0 0
//192.168.1.2/ServerStorage /mnt/networkdrive smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0

Tuttle 08-11-2005 02:20 PM

Try this(from mount man page):
Code:

_netdev
                    The  filesystem  resides  on  a  device that
                    requires network access (used to prevent the
                    system  from  attempting  to  mount  these
                    filesystems  until  the  network  has  been
                    enabled on the system).

and see what happens....

Tuttle 08-11-2005 02:23 PM

Try this(from mount man page):
Code:

_netdev
                    The  filesystem  resides  on  a  device that
                    requires network access (used to prevent the
                    system  from  attempting  to  mount  these
                    filesystems  until  the  network  has  been
                    enabled on the system).

and see what happens....

edit: eg:
Code:

//192.168.1.2/ServerStorage /mnt/networkdrive smbfs _netdev
edit2: don't know how I posted 2 times times

YaAqoB 08-11-2005 02:35 PM

So if I make it look like this....

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hda1 /mnt/WindowsDrv ntfs umask=0222 0 0
/dev/hdb1 /mnt/WindowsApps ntfs umask=0222 0 0
//192.168.1.2/ServerStorage /mnt/networkdrive smbfs _netdev credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0

It will not mount the network drive untill the network has been established??
Wicked I'll give it a go when I get home.

YaAqoB 08-11-2005 09:45 PM

I get an error in that line when I put _netdev in there.
Where abouts inthe line am I supposed to put it?

Tuttle 08-12-2005 08:13 AM

hmm, I thought that would work, what's the error exactly? it may be that you need all the fields filled in (see man fstab) or that the credentials field _is_ the options field ie. put "_netdev" at the end of the credentials field.... just a guess really!

edit: yeah, thinking about it, the "credentials" field is the first option, the final fields (the two zeros on the end) are the fs check options for the line above. So, try:
Code:

//192.168.1.2/ServerStorage /mnt/networkdrive smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777,_netdev 0 0
edit2: it doesn't show very clearly but the last options read:

credentials=/root/.smbcredentials,dmask=777,fmask=777,_netdev 0 0

ok.


All times are GMT -5. The time now is 09:17 PM.