Improve the Debian Boot Process\ Google Summer of Code 2006 \ \vspace{4mm} New boot process proposal\ Fourth Deliverable\ \vspace{4mm}

Improve the Debian Boot Process
Google Summer of Code 2006

New boot process proposal
Fourth Deliverable

student: Carlos Villegas (Carlos.Villegas at nuim.ie)
mentor: Petter Reinholdtsen (pere at hungry.com)

1  Introduction

In this deliverable we present a proposal to change Debian's boot process to be faster. This proposal is a result of the different tests of hotspots presented in the deliverable 3.
The main driving force to change the boot process is given by run-time dependency information, i.e., LSB-compliance. Several steps were taken towards making Debian boot process LSB-compliant. Amoung them we can account for a patch included recently in lintian to check LSB-compliance, a guideline for maintainers, a program to check LSB compliance of the init-scripts, a webpage updated frequently showing the status of lsb-compliance of the desktop subset of init-scripts, etc. If the tendency to make debian LSB-compliant continues, we may expect the relase etch+ to be compliant.
Besides, we make a brief comparison with the current boot process and other distributions.
Discussion on the project may be followed in the initscripts-ng-devel mailing list and the channel #pkg-sysvinit in irc.debian.org.

2  Boot process proposal

The boot process proposal aims to make the boot process faster and to provide a correct boot order thus allowing parallel execution of init-scripts. The approach proposed here has obtained an 8 second time decrease from 53 seconds to 45 sec of sysvinit time.1
The boot process proposal includes:
  1. Using dash as /bin/sh,
  2. reordering the init-scripts,
  3. setting the hwclock on the background,
  4. using readahead as preloading and
  5. removing unused init-scripts (gdm and hotkey-setup).
The previous steps are applied as described in the deliverable 3. The original and the modified bootcharts are presented as follows. Other hotspots were tried as well like parallel execution (with shell option), prelinking, remove the discovery init-script and setting the network in the background, and none of them caused a further time reduction and thus they were not included. Nevertheless, they also didn't affected the boot time negatively.
bootchart_debiansid2_original2_small.png
Figure 1: Bootchart of reference system (freshly installed sid)
bootchart_debiansid2_dash+reorder+hwclock+readahead-gdm_small.png
Figure 2: Bootchart for proposed boot system

3  Comparison with other systems

The proposed boot process for Debian should not be so hard for maintainers to accept as it is not far from the proposals made by other distributions. For example, Ubuntu already implements readahead and dash as /bin/sh [1]. Besides, SuSE provides a well tweaked version of insserv to provide a good system order for every different configuration based on run-time dependencies among other issues. The fact of putting the hwclock on the background may be an issue if it is not finished on time although normally the programs that require it are in /etc/rc2.d while hwclock.sh is in /etc/rcS.d.

4  Bugs and/or changes for the process to be useful for etch+

The main issues to work on to further improve the boot process are:
  1. include a program that checks and corrects the boot order every time something new is installed and,
  2. work on a better readahead list.
The former comes as a modification to insserv that may migrate to update-rc (sysvinit) while the latter consists of a list obtained experimentally for the typical system.

5  Conclusions and Future Work

The proposal presented here should be improved and complemented with code to check the proper run-time dependencies of the init-scripts. With the latter, together with the lintian check for LSB-compliance, the debian distribution etch+ should be compliant without much trouble as maintainers would make the necessary changes based on a real benefit.
Discussion on the project may be followed in the initscripts-ng-devel mailing list and the channel #pkg-sysvinit in irc.debian.org.

References

[1]
Ubuntu feature specification: Dash as /bin/sh. https://launchpad.net/distros/ubuntu/+spec/dash-as-bin-sh.

Footnotes:

1sysvinit time - from the moment /sbin/init takes control of boot process until KDE becomes usable.