Slow booting plagues most Linux distributions today, and while this is not a such big issue for systems that are booted once a year, it becomes an annoyance in laptops or other computers you initialize every day. Different solutions for this problem have been proposed, but booting of a typical Linux system today still takes too much time. It has been said that the Asus Eeepc boots remarkably faster than regular Linux distributions, thanks to its “fastinit” system initialization program. A quick analysis of its workings shows what it essentally does, and it’s quite obvious: start the user interface as fast as possible, and initialize the rest later. A more detailed analysis allowed us to rewrite it, and even find a couple of bugs in the original code.

Judging from its calls, the program performs the tasks of a simplified Unix init and some initialization scripts. It handles signals, mount filesystems, creates basic files, brings up basic networking, initializes the random seed (not quite! see note below), opens terminals and finally runs the X server, while starting other non-essential services in the background. It is cleverly designed, and while can be optimized a little more, it does its job well on the Eeepc. I reimplemented fastinit by writing a program that makes the same calls, you can get it from my git repository with git clone http://helllabs.org/git/eeepc.git.

This reimplementation may be useful in alternative Linux distributions running in the Eeepc to boot as fast as the original OS. I don’t recommend using it on a regular computer because it lacks functionality found in SysV init. Also note that this version aims to accurately replicate the behavior of the original fastinit, so it contains a number of bugs and unoptimized features:

  • Random seed initialization does not work. Note that the program redirects random-seed to /dev/null. If you fix that, it would still try to write an error message to /dev/urandom.
  • There’s no need to try to handle SIGKILL and SIGSTOP.
  • There’s also an attempt to handle signal 0.
  • Some of the calls made with system() could be done in C, such as directory creation.

The reimplementation has been written for educational purposes and has not been tested (mainly because I don’t have an Eeepc). It may contain errors, so I advise reviewing the code and procceed with caution if you wish to give it a try.

7 Responses to “Asus Eeepc fastinit reimplementation”

  1. Samo Vodopivec says:

    Tested finit on Asus EEE - as it seems everything is working as it should, but I did not have time to intensively test it. Just did a quick startup/shutdownt test :)

    Bye, Samo

  2. Metalshark says:

    Tested this on an ASUS EEE.

    Basically needed this to modify hwclock lines with –directisa when mucking about with the kernel.

    There is one fault. /boot/shutdown.b should be /boot/shutdown.fb - you were missing the “f”. Otherwise a sterling effort!

    May I ask the license this is under please? If it’s a GPL v2/3 jobby would you be interested in mods as/when available?

  3. claudio says:

    Thanks, I’ll fix the file name and check the license issues.

  4. claudio says:

    I kept the recreation as finit.c, and spawned an improved/optimized version as finit-mod.c which is supposed to be a drop-in replacement for fastinit. Adaptations to make it work with alternative distributions are in finit-alt.c. Both finit-mod.c and finit-alt.c are released under the MIT license.

  5. Hell Labs » Eeepc fastinit reimplementation update says:

    [...] is a number of updates in the Eeepc fastinit reimplementation that you might be interested [...]

  6. Jeremiah says:

    I’m having issues grabbing it from get is there a way you can post the source somehow. Thanks

  7. LuisPT says:

    Could you give some guidelines to implement this on Ubuntu Intrepid 8.10?

    Ubuntu uses UpStart instead of SysVInit (I think Debian uses sysvinit), but I think we could uninstall UpStart and install SysVInit from the repositories (as simple as apt-get remove ….. and apt-get install …..).

    I’m not a Linux developer but your approach is indeed extraordinary, so It would be great to implement this over Ubuntu.

    Please give us detailed instructions or guidelines you consider fundamental.

    Thanks in advance.

Leave a Reply