Aug 11 2009

shorten boot-time in ubuntu

Being an impatient person means, I really, really hate waiting for something to finish. Also, on Quakenet/#wardriving, people were talking about bootchart, a program that analyzes your boot process and performs some time- and hardware load-measures and in the end renders a nice chart displaying the results. But my serious interest only arose, when I got my new PC (Intel Quadcore Q9550,  2GB DDR2, …) in spring this year and realized that booting happens rather quickly :)

After reading some forums and googling about this topic, I only implemented two of all the suggestions, but still my boot process went down to 19 secs:



The first advise came from hexa: I could enable concurrency in init.d scripts – this one saved me from something above 30 seconds (sorry, I deleted the old bootcharts a while ago).

So, here’s how to:

  1. open /etc/init.d/rc
  2. search for CONCURRENCY
  3. change the value to “shell”
  4. save and close the file

Your init-scripts will now run simultaneously (i.e. faster ;))

Just a few days ago, I got to know about readahead and profiling the harddisk read-processes

Doing this is rather easy, if you’ve ever meddled with boot-parameters in GRUB – but don’t hesitate if you never did, it’s still not that hard:

  1. reboot
  2. Instead of waiting or pressing Enter when “Ubuntu ..” appears in the bootscreen, press E
  3. you can now select a line you’d like to edit. Select the line that begins with “kernel
  4. press E again
  5. append the word “profile

The kernel will now perform an analyzation of your boot-process (i.e. this boot will take longer; was about 3-4 minutes for me). After this Ubuntu knows which files are needed when booting up and preloads them into RAM (saved me five to six seconds).

So, all in all, it went down to a width of 520 pixel and 19 seconds :)

P.S.: Sorry – disclaimer: I can and will not be held responsible for the actions you perform on your computer. Inform yourself on possible countermeasures and restore-functions, in case one of the stated procedures cause any harm to your system