# smb mount problem @ boot time



## mururoa (Nov 17, 2009)

Hi there,

Now that I use 8.0 (RC3) I have a little problem with smb mounts.
I suspect that the problem is zfs related and/or network related.

Here is my /etc/fstab :


```
# Device Mountpoint FStype Options Dump Pass#
/dev/ad8s2b none swap sw 0 0
/dev/ad8s2a /bootdir ufs rw 1 1
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/dev/acd1 /cdrom1 cd9660 ro,noauto 0 0
linproc /usr/compat/linux/proc linprocfs rw,late 0 0
//guest@ROUTEUR/nas /shares/stick smbfs rw,late 0 0
```

all is ok up to linproc (included) but when it comes to the smb share the boot process stops asking me to enter return for shell. So I press return, get the shell, do nothing, and then enter ^D to continue the boot. In the end the smb filesystem is mounted and all is working ok. If I remove the last line ofc there is no problem at all outside that I have to mount /shares/stick by hand.

Here is the message :

```
Nov 16 18:24:53 mururoa-gb init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
```

All is using zfs on my system outside the /boot partition (inside /bootdir) and the swap so /shares/stick is on zfs but /usr/compat/linux/proc is on zfs too and it's ok with the late option for this one. So maybe the network is available too late in the boot process to mount smb. Can I have network available sooner ?
I tried to add extra_netfs_types="YES" in rc.conf but it didnt help either; this one should be for nfs.
What's the trick to get smb filesystems mounted inside zfs mount points ?


----------



## SirDice (Nov 17, 2009)

Try

```
//guest@ROUTEUR/nas /shares/stick smbfs rw,late,-N 0 0
```


----------



## mururoa (Nov 18, 2009)

SirDice said:
			
		

> Try
> 
> ```
> //guest@ROUTEUR/nas /shares/stick smbfs rw,late,-N 0 0
> ```



-N is for "dont ask password" no ?
If yes that wont change anything since the mount fail just at the time it is tried during the boot. After the error and the prompt for shell I dont even have to enter a 'mount /share/stik' since it IS mounted without that when I enter just ^D to continue the boot process.
Since if fails on /shares/stick and not for /usr/compat/linux/proc I suspect that the problem comes because the network is available too late. I guess there is a problem with ntpdate too that cant get the time but I can see that only on the fast scrolling console @ boot and didnt found it in the logs.
That was working without any problem using 7.2.

My boot process should be :
- be sure zfs is ok
- THEN be sure network is ok
- THEN run the rest
 but it seems it is not.

I should look for setting all the network settings fixed instead of dhcp.


----------



## mururoa (Nov 20, 2009)

I've tested -N, just in case, and this change nothing 
Still have to use fixed network parameters.


----------



## mururoa (Nov 21, 2009)

Ok, so I setup no dchp networking and this did the trick but there must be a problem somewhere. It should have worked using dhcp ...


----------

