Bug 148493

Summary: 8.0-RELEASE #0 won't boot if it can't mount smbfs entries in fstab
Product: Base System Reporter: Reed L O'Brien <reed>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 8.0-RELEASE   
Hardware: Any   
OS: Any   

Description Reed L O'Brien 2010-07-11 08:50:02 UTC
Machine went down due to a very extended power outage.

It was running fine, but after reboot it wouldn't come up at all. It dropped back to single user mode.

The actual cause was a firewall rule blocking wins resolution when trying to mount /etc/fstab during init.

I don't know if this qualifies as a bug, but it seems rather silly that the system can't boot after mounting all the local filesystems. I understand that if init exits nonzero from mount it can't tell if it was / or an smbfs mount that failed. So, maybe the non-essential mount points should go in a /usr/local/fstab or something.

I wanted to report it though as I am sure someone else has been or will be bitten by this. it was especially painful as the machine runs headless...Your call. If you need me to follow up on anything let me know.

Fix: 

Easy enough just add the correct rules to allow smb/cifs traffic in the firewall; pf in this case.
How-To-Repeat: mount a win2kx server share in /etc/fstab and then enable pf without creating a rule to allow smb/cifs traffic. Wait until there is a 6 hours power outage. The machine functions fine until it reboots. Then init exits non zero from trying to mount the entries in fstab.

Logged error:
Jul  8 14:48:53 babahoya kernel: netsmb_dev: loaded
Jul  8 14:49:22 babahoya init: /bin/sh on /etc/rc terminated abnormally, going to single user mode

Console error was something close to:
smbfs: can't get server address: syserr = Operation timed out
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2010-07-11 09:18:11 UTC
State Changed
From-To: open->closed

Well this is not a situation that we can easily fix. If you as the owner 
/ administrator of the system tell it to mount a remote file system, you 
have obvious reasons for it. FreeBSD will try its best to mount the 
disk, but since a firewall, or network or remote host can be down and we 
cannot tell from the mount command itself, it retries a few times, 
aborting mounting because the system does not want to start the system 
without the by your issued mountlist. The disk could be vital to the 
success of the startup and usage. So sadly, this is the reality and we 
should live with it.