19 November 2009

Boot Debian faster with Upstart


The Upstart daemon has been in development for quite some time as a contemporary replacement for the classical System V init. Being fully backwards compatible with existing init scripts, Upstart introduces support for event based, parallel execution of startup tasks in the form of "jobs" stored in the /etc/init directory.

Looking at the job scripts, I see it doesn't do much more so far than entering the default runlevel and executing the legacy System V scripts, but a speedup just before the graphical login is already achieved by allocating only one virtual console by default. Also, there seems to be less of a delay directly after the kernel is done initializing. I didn't notice any issues after having used Upstart for a month now, so I'll tell you how to install it on Debian Sid. Upstart is also available in some other Debian based distros and Fedora, use the respective package manager there. I'm using Aptitude for this article.

If Aptitude isn't installed on your system, get it using your GUI software manager or do a sudo apt-get install aptitude, then start it. Use / (the slash) to search for the upstart package, then press + (plus) to mark it for installation. Now aptitude will complain about a conflict with the sysvinit package; that's because upstart wants to remove sysvinit, but sysvinit is an essential system package. Ignore that, search for sysvinit and mark it for removal using - (minus). Aptitude will ask you to confirm the removal by inputting the phrase "Yes, I am aware this is a very bad idea". Do that and the conflict will resolve. Press G and verify in the shown summary whether sysvinit will really be removed (shown in purple) and upstart will really be installed (shown in green). If you screwed something up, press q and undo the selections, else press g another time to start the installation. When done, you can quit Aptitude by pressing q in the main view. Next reboot will be slightly faster :-)

0 Kommentare:

Post a Comment