Search:  
Gentoo Wiki

TIP_Speed_up_your_boot_time

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

Speed up SysVInit

SysVInit is the default init system when installing gentoo. It's been used on lots of computers for a very long time, so it's pretty reliable. However, there are some efforts made at the moment to provide (at least home users) with more speed and features, so you may want to check the section at the bottom. Nevertheless, there are also some possibilities to squeeze some more speed out of your SysVInit. These approaches are handled in the following few paragraphs.

The RC File

Edit /etc/conf.d/rc:

File: /etc/conf.d/rc

change

RC_PARALLEL_STARTUP="NO"

to

RC_PARALLEL_STARTUP="YES"

Note: As of sys-apps/baselayout-1.12.20_pre3-r2, RC_PARALLEL_STARTUP has been removed. New baselayout uses the RC_PARALLEL variable.

Remove Unneeded Services

Are you starting up an SSH server, but never log in remotely? Do you know what's popping up in start-up?

Issue a rc-status boot and rc-status default to see what's been started. I get the following:

Code: rc-status boot
Runlevel: boot
keymaps                                                             [ started ]
clock                                                               [ started ]
localmount                                                          [ started ]
consolefont                                                         [ started ]
modules                                                             [ started ]
net.lo                                                              [ started ]
urandom                                                             [ started ]
rmnologin                                                           [ started ]
bootmisc                                                            [ started ]
Code: rc-status default
Runlevel: default
xfs                                                                 [ started ]
dbus                                                                [ started ]
sshd                                                                [ started ]
cupsd                                                               [ started ]
spamd                                                               [ started ]
vixie-cron                                                          [ started ]
syslog-ng                                                           [ started ]
net.eth0                                                            [ started ]
numlock                                                             [ started ]
alsasound                                                           [ started ]

Perform an rc-update del servicename on the items you don't use.


If you want to see all available init scripts:

Code: rc-config list

Available init scripts

 acpid
 bootmisc                  boot
 checkfs                   boot
 checkroot                 boot
 clock                     boot
 consolefont               boot
 crypto-loop
 cupsd                     default
 domainname                default
 esound
 famd
 gpm
 hdparm
 hostname                  boot
 i8k
 keymaps                   boot
 lisa
 local                     default nonetwork
 localmount                boot
 metalog                   default
 modules                   boot
 net.lo                    boot
 netmount
 nscd
 numlock                   default
 pg_autovacuum
 portmap
 postgresql
 pwcheck
 quota
 reslisa
 rmnologin                 boot
 rsyncd
 samba
 saslauthd
 serial                    boot
 sshd                      default
 svnserve
 urandom                   boot
 vixie-cron                default
 webmin
 xdm                       boot
 xfs

With rc-config you also can add, delete, start, and stop init scripts. Perform an rc-config to find out more.

NOTE: You can move xdm (X server) to the boot level on a workstation.

Other Init Systems

The default init for Gentoo is sysvinit however there are some other experimental Init Systems available, which are designed much more towards speed. Most (if not all) of them are still in development though, so you shouldn't use them on your most loved production server. However, they will all provide you with a much faster bootup and you will be able to revert to your old sysvinit by just choosing another line in grub, so it's fairly risk-free for experimentation on non-production machines.

eINIT

This Init System is still being developed very intensively, there is an ebuild on the official portage tree for einit-0.22 which is ~arch masked. eINIT is primarily designed to be as small, efficient, and feature packed as possible, with an emphasis with embedded systems but serves as a great sysvinit replacement for the desktop as well, with boot times as low as a few seconds after the kernel loads it. Currently eINIT supports GNU/Linux, FreeBSD, and Mac OS X.

You can also get the latest stable (einit-0.25.0) release, and current development sources from SVN by adding the einit overlay via Layman, for more information on setting eINIT up on your machine please see the eINIT. If you have any problems please see the eINIT website, and feel free to ask on Gentoo Forums/Unsupported Software, where you can get help if you get stuck, there's also #einit on irc.freenode.net.

eINIT has a successor called kyuba

initng

initng is another sysvinit replacement in development and can be found in portage. You can read the InitNG for details on installing and configuring it.


other

See Also

Retrieved from "http://www.gentoo-wiki.info/TIP_Speed_up_your_boot_process"

Last modified: Wed, 24 Sep 2008 14:23:00 +0000 Hits: 53,892