Where the Linux boot process can fail and how to solve it

Booting a computer to run Linux is quite a complex procedure. Happily it's understandable, so correctable when things break.

  1. P.O.S.T. The computer is powered on, the computer shows you a screen to configure some basic settings, the BIOS and tests itself. Not much Linux here!
  2. Boatloader Grub, Lilo or some other boot loader is started. The bootloader is a small piece of code that is able to start loading the kernel. Mostly you will have some options to edit boot parameters, like "single" to start in single user mode.
  3. The kernel This is where Linux starts, you'll see all kinds of (cryptic) messages scrolling over your screen. Use dmesg to see them again after booting.
  4. INIT The process "init" is started, the first process on a Linux machine. Init read /etc/inittab and launches RC.
  5. RC This facility is responsible for starting all the daemons and programs that make Linux a server.

Bootloader errors and fixes

The bootloader could point to a kernel that's not there, or adds a boot parameter that incorrect. A.k.a. a typo. Review your Grub or Lilo configuration and try again. Grub is a lot easier to debug, is has a minimalistic shell included.

Kernel errors and fixes

You could have built a kernel that's not suitable for your computer. I hope you have left and old kernel on your system, use Grub to select that kernel and boot it.

Init errors and fixes

Init is quite simple, it reads /etc/inittab and starts RC. When you have "played around with" /etc/inittab and made a typo somewhere, you might need to boot of a CD to fix the typo.

RC errors and fixes

This is the part where many "errors" can occur, like: "Apache is not starting". Review the startup script in /etc/init.d, review that there a script and it has no errors in it. Also read the article about controlling daemons.