FreeBSD boots, but seems to hang at the Starting ssh.. stage. The system eventually continues booting, but can take 10 minutes or more to get there.
Contrary to what some users mistakenly believe, this is not ssh itself hanging (you can ssh into the system at this stage, showing that ssh is actually working).
The problem is with sendmail which loads after ssh and just seems to sit there buggering about and delaying any and all subsequent processes from loading.
After much fiddling, dabbling and delving, I have finally found a fix which seems to work where other fixes didn't. My systems now boot à tout vitesse!
The problem often arises when there's no DNS entry for the machine which is booting. Some writers have suggested that putting an entry into /etc/hosts consisting of ip address - hostname for that machine will fix the problem, as the system does a hosts lookup before it does a DNS query (see DNS).
However the problem lies not in the forward DNS, but in the REVERSE DNS. As noted by my erudite colleague Mr. Fratangelo, the system needs to do this reverse DNS which is not helped by the hosts file.
This problem does not seem to occur on a stand-alone system, where there's no entry in /etc/resolv.conf for a DNS lookup. It doesn't happen at work either, where our teaching LAN sits behind a FreeBSD based gateway/firewall with a Windows 2003 Domain Controller doing the Active Directory/DNS thing. And therein lies the answer.
My home LAN consists of a Windows 2000 Server based firewall/ADSL gateway using WinRoute Pro and no internal DNS. All queries from the LAN get forwarded to the default gateway and off to the DNS chain via my ISP. In light of the above evidence, that the hosts entry was apparently being ignored by sendmail on boot, I installed the DNS service onto my gateway and created a new forward lookup zone for each of the FreeBSD servers.
Although the Reverse DNS Zone found on Microsoft's DNS shows no entries (PTR record), the reverse DNS still happens. If a BIND or 'nix based box is used for the DNS Server, then it will be necessary to create this reverse lookup for the other system's hostname/ip before it works properly.
And that's it. Sendmail
is once more appeased and my FreeBSD systems boot nicely, with no delays. Splendid.