Reducing boot times

It takes a few minutes to boot FreeBSD, and I'm wondering if it's possible to reduce the boot time to under 1 minute (some articles on the Internet show that Fedora 11 is capable of this). I'm running GNOME for my desktop, but I might switch to KDE/Openbox/Fluxbox in the near future.
 
1) what hardware you have?
2) what version of freebsd you have?
3) how did you configured - kernel,services etc..
4) do you start Xorg with xdm/gdm
5) when you boot - the system is stopping every time after "configuring syscons: blanktime" ?
for to be able to troubleshoot something, you need as much as possible information.
 
Hardware:
Intel Pentium D 3.4 Ghz, 2 GB of RAM, HDD: SATA 250 GB. Only 100 GB is used for FreeBSD though.

FreeBSD:
Running 7.2-RELEASE-p2

System:
My kernel is a custom one. Mainly took out the debug options, RAID controllers, unused NICs, FireWire, etc. I added ACCEPT_FILTER_HTTP, ACCEPT_FILTER_DATA, QUOTA, if_bridge, PF & ALTQ support. Only PF is used though.

In /etc/rc.conf, I've got lpd, linux, abi, usbd, hald, dbus, gdm, pf, fusefs, clamav, and postfix enabled while sendmail is disabled. 2 NTFS and 1 FAT32 drives are mounted as well as procfs and linprocfs.

/etc/make.conf (also excluded some unused modules):
Code:
CFLAGS= -O -fno-strict-aliasing -pipe

/etc/src.conf:
Code:
WITHOUT_BLUETOOTH= yes 
WITHOUT_GAMES= yes 
WITHOUT_HTML= yes 
WITHOUT_IPFILTER= yes 

WITHOUT_GSSAPI= yes 
WITHOUT_KERBEROS= yes 
WITHOUT_RCMDS= yes 

WITHOUT_IPX= yes 
WITHOUT_I4B= yes 
WITHOUT_ATM= yes 
WITHOUT_RCMDS= yes 
WITHOUT_SENDMAIL= yes

GDM:
Starting gdm by putting it in /etc/rc.conf

The system doesn't pause while going through the whole booting process. Haven't seen any errors yet as well. Just wondering if there's a way to make it boot faster.

Edit: Forgot to add the output of $ kldstat.
Code:
 1   21 0xc0400000 591534   kernel
 2    1 0xc0992000 1a148    snd_hda.ko
 3    3 0xc09ad000 4a3b8    sound.ko
 4    1 0xc09f8000 4ec4     snd_ad1816.ko
 5    1 0xc09fd000 5354     sem.ko
 6    1 0xc0a03000 2d0e0    vboxdrv.ko
 7    1 0xc0a31000 75b904   nvidia.ko
 8    3 0xc118d000 29b54    linux.ko
 9    1 0xc11b7000 6a44c    acpi.ko
10    1 0xc5e2e000 7000     linprocfs.ko
11    1 0xc61b6000 e000     fuse.ko
 
dennylin93 said:
Just wondering if there's a way to make it boot faster.
Nope. Not really. Unless you disable a bunch of stuff you're starting now. But you probably need those :e
 
Roughly 2 minutes since the computer is started till GNOME is ready. I guess it doesn't make much difference though.
 
Disable gdm, and then time how long it takes to boot to a console login prompt. I'm guessing the longest part of the boot will be loading X, loading GNOME, loading the desktop, etc. If that's the case, there's really nothing you can do.

On my home desktop (P4 3.0 GHz w/2 GB RAM), it takes about the same amount of time to boot to the text console, as it does to load X and KDE afterwards.
 
How could I disable gdm at startup? I don't find any documentation on my system.
gdm really annoys me.
 
/etc/rc.conf was easy. If I found any hints about gdm in /etc/rc.conf I wouldn't
post about such a trifle. I have built xfce4 with gdm support.
I run
Code:
/usr/local/sbin/gdm-stop
to stop this thing.

Well,I added
Code:
gdm_enable="NO"
and after reboot it worked, without any error message. Hm, funny.
 
You may have gnome_enable="YES" on your /etc/rc.conf. Gnome_enable implies hald_enable, dbus_enable, avahi_enable and gdm_enable.
 
This loads everything GNOME needs to run, including D-BUS and HAL (if I'm not mistaken), so remove or comment this line out and add lines for D-BUS and HAL instead:
Code:
dbus_enable="YES"
hald_enable="YES"
 
No, it isn't required. It is just equivalent to:
Code:
dbus_enable="YES"
hald_enable="YES"
avahi_daemon_enable="YES"
avahi_dnsconfd_enable="YES"
gdm_enable="YES"
 
gnome_enable is just a convenience variable for those using the full-blown GNOME desktop. It saves those people a bit of typing. :)

For those not using GNOME, you need to enter each of the separate variables for HAL, d-bus, avahi, etc.
 
I guess that disabling services is not a good solution.
We need parallelization of kernel device detection and boot procedures.
And maybe some services can start in parallel.
 
Antti said:
And maybe some services can start in parallel.

good idea. i wanted to try this, and here's a patch (attached) for /etc/rc (made with FreeBSD 8-STABLE): i was able to drop 20 seconds starting eight services (kdm4 and apache22 among them) in background. it shouldn't fail, unless some local services require other local services (i didn't take care of it)

i think i'll file a pr: implementing this in rcorder shouldn't be difficult, and would make possible to start even more processes in background
 

Attachments

  • etc-rc.diff
    756 bytes · Views: 251
Back
Top