# Two minutes to boot (9.2r i386)



## SpirosAnon (Nov 18, 2013)

I made a fresh install of FreeBSD 9.2 i386 on a laptop. But in the starting sequence the following problem happens.(see video please)

https://www.youtube.com/watch?v=6yMWr6a-Zeo

On the 24th second *I*'m fast-forwarding the video but in reality it takes 1 minute and ~30 seconds in order to allow me to login etc. etc.

I think it's not normal at all. I'm using it as a desktop and it's frustrating to wait so much. The worst is that *I* don't know what to look for!

Thank you for reading. Any idea?


----------



## wblock@ (Nov 18, 2013)

What model of laptop?  What entries are in /etc/rc.conf?


----------



## SpirosAnon (Nov 18, 2013)

It is an Acer Extensa 5220. (I have a tiny problem with the laptop's screen as you may have seen  )


```
hostname="freebsd.desktop"
keymap="gr.us101.acc.kbd"
ifconfig_bge0=" inet 192.168.1.55 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
sshd_enable="YES"
dumpdev="NO"
hald_enable="YES"
dbus_enable="YES"
```


----------



## wblock@ (Nov 18, 2013)

It was very difficult to read the screen in that video.

Acer machines generally work well with FreeBSD.  For testing, please comment out the last four lines in /etc/rc.conf and see if it shows a prompt more quickly.


----------



## SpirosAnon (Nov 18, 2013)

I forgot to say that I'm using Xfce4 as a GUI, but no login manager.

I tried what you told me but no progress at all. The same result again. What else do I need to look for?

Thank you


----------



## kpa (Nov 18, 2013)

What is in /etc/resolv.conf? Is DNS resolution working normally when you log into the system?


----------



## SpirosAnon (Nov 18, 2013)

My /etc/resolv.conf is like this:

```
search 192.168.1.1
nameserver 192.168.1.1
nameserver 8.8.8.8
```

I have added the 8.8.8.8 just for backup.


----------



## kpa (Nov 18, 2013)

The search line should have a domain name instead of an IP address. Delete it for now and see if that helps.


----------



## kpa (Nov 18, 2013)

Looking at the specs of that machine two minutes to load the whole OS plus X and the related services doesn't sound too unlikely. It has a slow HDD and underpowered CPU that won't give you a spectacular performance with any OS.


----------



## SpirosAnon (Nov 18, 2013)

kpa said:
			
		

> The search line should have a domain name instead of an IP address. Delete it for now and see if that helps.



Nothing again. I tried with search but nothing following it, search with the local domain and without it but the result is the same.



			
				kpa said:
			
		

> Looking at the specs of that machine two minutes to load the whole OS plus X and the related services doesn't sound too unlikely. It has a slow HDD and underpowered CPU that won't give you a spectacular performance with any OS.



I don't load the GUI at all. I start Xfce by typing `startxfce4` manually.


----------



## kpa (Nov 18, 2013)

Anything odd or suspicious in the `dmesg -a` output, errors or warnings related to the HDD for example?


----------



## aupanner (Nov 18, 2013)

`rcorder /etc/rc.d/* /usr/local/etc/rc.d/*`

Whatever is between /etc/rc.d/syscons and /etc/rc.d/cron is the problem.


----------



## SpirosAnon (Nov 18, 2013)

I will quote you some lines from `dmesg -a` which have to do with the hard drive I think.


```
...
ada0 at ata2 bus 0 scbus1 target 0 lun 0
ada0: <Hitachi HTS542512K9SA00 BB20C31P> ATA-8 SATA 1.x device
ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes)
ada0: 114473MB (234441648 512byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
...
Starting file system checks:
/dev/ada0p2: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0p2: clean, 25963101 free (3949 frags, 3244894 blocks, 0.0% fragmentation)
Mounting local file systems:.
...
```


----------



## SpirosAnon (Nov 19, 2013)

aupanner said:
			
		

> `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*`
> 
> Whatever is between /etc/rc.d/syscons and /etc/rc.d/cron is the problem.



Yeah! You are right. I found that in between /etc/rc.d/syscons and /etc/rc.d/cron are sshd and sendmail. Sendmail is the little daemon that causes the problem.

The problem was solved by adding the following lines in /etc/rc.conf:

```
sendmail_enable="NONE"
sendmail_msp_queue_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
```

The solution was found here: http://forums.freebsd.org/showthread.php?t=1804

Thank you all for helping!


----------



## Anonymous (Nov 19, 2013)

You didn't read that thread to the end. Instead of disabling sendmail you might want to consider to give your system a fully qualified hostname.


----------



## SpirosAnon (Nov 19, 2013)

That is what I'm trying now, but for now I don't have any positive results. Do I need to change any other file too, except /etc/hosts?


----------



## beatgammit (Nov 19, 2013)

Did you also change 
	
	



```
hostname="your-hostname"
```
 in /etc/rc.conf?


----------



## markbsd (Nov 19, 2013)

I watched the video once, but didn't notice if you were getting this message (or something to this effect) at boot:



> unqualified host name (servername) unknown; sleeping for retry



This, for some strange reason, just started happening to me on two new FreeBSD installs where I used the same hostname as I had on previous installs on the same network that never received this message at boot. Anyway, solution -- make the relevant part of /etc/hosts use this format:


```
::1           localhost localhost.bsdunix.com <hostname>
127.0.0.1     localhost localhost.bsdunix.com <hostname>
```

n.b. where <hostname> is whatever your $hostname is in /etc/rc.conf (hostname="")

The FQDN (Fully Qualified Domain Name) needs to be _before_ your hostname. This way the system is able to resolve a domain name before getting hung up on your hostname. Strangely, on one of my FreeBSD boxes I don't use this format, but I have no message or delay.


----------



## SpirosAnon (Nov 19, 2013)

beatgammit said:
			
		

> Did you also change
> 
> 
> 
> ...



Yes! This works. It takes about 6 seconds to start Sendmail and I don't think I need it so maybe I will go with the first solution. Thank you anyway!



			
				markbsd said:
			
		

> I watched the video once, but didn't notice if you were getting this message (or something to this effect) at boot:
> 
> 
> ```
> ...



No such problem for me but good for the community to know a solution and for that


----------



## kpa (Nov 19, 2013)

One point about editing /etc/hosts. Never remove the plain localhost entry from it because there's good amount of stuff in FreeBSD that assumes that the name localhost resolves to 127.0.0.1 and only to that address. Same applies the other way, 127.0.0.1 should resolve to only localhost.


----------



## wblock@ (Nov 19, 2013)

The video was a problem.  When DNS is not working, there are usually two pauses.  I did not see that in the video, but it was hard to see and parts of it were sped up.

For next time: The Interrupted Unix FAQ, #1.


----------



## SpirosAnon (Nov 19, 2013)

The video is only sped up at the point where it stops loading. Nowhere else.


----------

