Friday, August 11, 2006

Speeding Up Ubuntu's Boot

It's always irritated me that when Ubuntu boots up it displays messages such as

  • Starting PCMCIA FAIL
  • Starting BlueTooth
  • Searching for RAID devices

with comparable messages when the machine shuts down.

This is a desktop machine. It doesn't have a PCMCIA slot. Neither does it have BlueTooth.

I spent, maybe, $700 total on this machine over the last three years. Today I could get a faster box with more memory and the same capabilities for maybe $500. Why in Frak's sake would I put a RAID on this thing?

I went to /etc/init.d and was just about ready to start deleting files — in particular pcmcia. Fortunately, I decided to do a bit of a search, first, and found HowTo: Speed up ubuntu boot process. This is an extremely useful document. It tells you how to get and run sysv-rc-conf, a text-based program that edits your startup and shutdown configuration so that unnecessary programs are disabled. (There was a graphical version of this in Fedora, IIRC. Outstanding.)

On my box, once I installed sysv-rc-conf, I ran it using

sudo /usr/sbin/sysv-rc-conf

since I don't have /usr/sbin in my path. Then I read the article, and decided to shut down:

  • bluez-util, since I don't have Bluetooth;
  • laptop-mode, since this ain't;
  • mdadm and mdadm-raid, RAID control programs;
  • pcmcia and pcmciautil, as there is no PCMCIA card on this machine; and
  • ppp and ppp-dns, since I don't do dial-up.

I also visited the section of the article about editing file names in /etc/rc0.d and /etc/rc6.d, moving the files associated with mdadm, ppp, and PCMCIA from "K"name to "k"name, removing them from the boot and shutdown process.

I'm pretty sure that bootup is a bit faster, but I didn't do any timings. At least it gets rid of the annoying messages.