LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! (https://www.linuxquestions.org/questions/ubuntu-63/fstab-my-win-share-wont-mount-%40-boot-but-will-when-i-sudo-mount-a-please-help-456024/)

TruANTOlogy 06-18-2006 04:58 PM

FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help!
 
Hey all,
Using 6.06 LTS (Dapper Drake), and have a small problem, that I couldn't resolve on my own.

When the computer boots up, It doesnt give any errors, but fails to mount my windows share!

As soon as I log in, I can drop to a term and "sudo mount -a" and it mounts with out any problems.

I am to assume that when it trys to mount that share during boot, it hasnt yet activated ETH0, which would be the only thing I can think of that would make it fail...but I don't know where to check that (im kind of a Gnoob).

Attached is my fstab, please tell me what I should do to allow my windows share to mount @ boot.

Thanks,
TruANT

Quote:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/md1 / ext3 defaults,errors=remount-ro 0 1
#/dev/hda1 /media/hda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/md0 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
# Custom Adds
//192.168.1.100/media /media/media cifs username=[username],password=[password],dmask=777,fmask=777 0 0

zener 06-18-2006 05:46 PM

Try changing the Windows' partition like this

Quote:

/dev/hda1 /media/hda1 ntfs nls=utf8,umask=0222 0 0
Call it instinct, but wouldn't be a good idea to un-comment
(removing the #) the line that has the info for the Win partition?!:D

I don't think that having problems probing the ethernet is affecting this

TruANTOlogy 06-18-2006 06:03 PM

Quote:

Originally Posted by zener
Try changing the Windows' partition like this



Call it instinct, but wouldn't be a good idea to un-comment
(removing the #) the line that has the info for the Win partition?!:D

I don't think that having problems probing the ethernet is affecting this

thats not the mount im having an issue with, the windows share (/media/media) is

the commented one is for a partition I havent got around to formatting yet.

thanks

ps, just to clear up any confusion, media/media is a samba share.

TruANTOlogy 06-19-2006 02:44 AM

Update:
I noticed that right before gdm starts up, there is a flash of text across the top of the console login screen. I CNTL+ALT+F1'ed over and saw what it said...
Quote:

[17179596.116000] CIFS VFS: Error connecting to IPv4 Socket. Aborting operation.
[17179596.116000] CIFS VFS: cifs_mount failed w/return code = -113.
I am still assuming that NETWORKING is not active when this share attempts to mount. Is there any easy way I can change the runlevels so that networking starts before smb / fstab items are mounted?

And if so, what scripts do I edit?

Thanks,
TruANT

binary_y2k2 06-19-2006 09:19 AM

I think it would be easyer just to remove that line from fstab and make a script like
Code:

mount //192.168.1.100/media /media/media -t cifs -o username=[username],password=[password],dmask=777,fmask=777
put it in /etc/init.d and link in /etc/rc[2345].d i.e.
Code:

update-rc.d [script name] start 20 2 3 4 5

TruANTOlogy 06-19-2006 02:53 PM

KEWL! thanks for the tip. I know nothing about scripts in linux though ( Again...Linux Gnoob, Windows Pro ), should i put the #!/bin/sh at the beginning. or just have an empty file (EXE to Root) that looks like the code you placed on top?

Thanks again!

TruANTOlogy 06-19-2006 07:43 PM

I tried the following:
"sudo gedit /etc/fstab"
[Removed The mount entry for the share in question]
"sudo gedit /etc/init.d/mediashare"
Quote:

#!/bin/sh
mount //192.168.1.100/media /media/media -t cifs -o username=***********,password=*******,dmask=777,fmask=777
"sudo chmod 755 /etc/init.d/mediashare"
"sudo update-rc.d mediashare start 20 2 3 4 5 ."

With the above, I still got the same error, so I tried the following:
"sudo update-rc.d -f mediashare remove"
"sudo update-rc.d mediashare start 90 2 3 4 5 ."

I rebooted and still got the same error, and the share isnt mounted.

What do I do now...I'm so confused!

PS, just to clarify, when i excecute the following:
"sudo /etc/init.d/mediashare"
the share mounts as expected.

binary_y2k2 06-20-2006 04:51 AM

Hmm, that's strange.
As long as networking is up and samba is started it should work.
Maybe you could try removing the links in /etc/rc*.d and just add the line
Code:

mount //192.168.1.100/media /media/media -t cifs -o username=***********,password=*******,dmask=777,fmask=777
to /etc/rc.local, that always runs at the end of bootup.

TruANTOlogy 06-20-2006 08:00 AM

Binary, you are uber kewl...thanks!! That worked like a charm!


All times are GMT -5. The time now is 02:43 AM.