Quicker booting with InitNG

Section: Linux

Note: As of openSUSE 11.2 and many other late 2009 releases, scripts like InitNG are becoming less important. My main desktop (a dual-core 2.4GHz Intel) can boot from cold in about 25s, including POST screen and a couple of seconds waiting on GRUB all the way through to a logged in and functional desktop. The following is kept as a reference document.

The standard Linux boot process uses an old system called "init" for its bootup scripts. The main problem with init is that it is a sequential boot loader, running one script at a time and waiting for it to finish before starting the next one. In many cases this can lead to startup scripts unnecessarily waiting for a long time while other scripts run. InitNG, on the other hand, takes advanted of parallelism and starts scripts as quickly as possible once their dependancies have been met.

There are also other alternatives to init and InitNG such as Ubuntu's Upstart, minit (a minimal init) and runit. InitNG is probably the better known and more widely available version, though.

The following instructions came from using Fedora Core 6 and Gnome but should be applicable (with some minor changes of menu locations etc) for most similar Linux flavours.

Installation

Thanks to RPMs the installation process is simple. Either load up your favourite (e.g. Smart) and install initng and its dependancies from the repositories or run the following command (as root) from a console:

# yum install initng

Once installation is complete (having confirmed any questions about additional dependencies such as initng-files) then initng should be installed and running. To check, do one of the following:

  • Open /boot/grub/grub.conf and look for a line containing init=/sbin/initng. It should also go by the default name of "initng boot"
  • Assuming you have the system-config-boot package installed, run system-config-boot (from the console) or go to System > Administration > Bootloader and there should be a new entry at the top of the list (and selected as default) called "initng boot".

If this entry does not exist, copy your existing default boot entry and add init=/sbin/initng to the end of the line that begins kernel /vmlinuz-…

Using InitNG

InitNG should now be available through the main GRUB menu on startup. If it isn't the default, select it and watch your boot process fly by. The only down side at the moment appears to be that you no longer get the pretty RHGB during startup, but considering boot times on my machine are down from over a minute to around 20 seconds then it's not so much of an issue!

Problems using InitNG

When I first installed InitNG I couldn't get it to start the X server properly. Looking at the error message I saw the following:

Font renferer for ".PCF" already registered at priority 0
Font renderer for&hellip

Could not initialise font path element unix/:7100, removing from list!
Fatal server error: could not open default font 'fixed'

A quick search showed that this error occurred when the xfs daemon wasn't started. To solve this run the following command (as root)

# ng-update add daemon/xfs

If you also use lm_sensors (e.g. through the Gnome Sensors Applet or GKremll) then run the following as root to get full sensor reports back:

# ng-update add system/lm-sensors

InitNG after updates

As InitNG is newly installed and operational on my machine, I do not know how it handles updates in either the kernel or in InitNG itself. Kernel updates may result in old kernels being run, or the grub.conf file may be automatically updated to point to the latest. InitNG updates as a full RPM install may wipe old settings, which would mean that you would have to be careful after having added lines such as the xfs loading.

Navigation