Troubleshooting boot problems

Patrick Goetz pgoetz at
Tue Apr 20 19:33:18 UTC 2010

> Subject: Re: Troubleshooting boot problems
> From: Brian Vaughan <bgvaughan at>
> Date: Fri, 16 Apr 2010 07:53:30 -0700
> I'd like to see a good overview of Ubuntu's startup process. I just took
> a class on Unix/Linux system administration, and we spent quite some
> time on system startup and shutdown -- but mostly in terms of Sys V init
> scripts and runlevels. I'm clueless about upstart and plymouth.

A couple of months ago there was a very good discussion of upstart on 
this list (2010-02-24 - 2010-03-05) wherein I expressed some concerns 
about tracking event triggers, etc..

I realize everyone is busy with getting Lucid out, but maybe it would be 
helpful to go through an example.

Recently I've been trying to find out if there is a canonical (no pun 
intended) way of setting up iptables firewall rules on Ubuntu.  We have 
various (some relatively complicated) iptables scripts that need to be 
migrated with newer server installs, and ufw looks too elementary. 
Besides, these scripts are already written and debugged -- I just want 
to run what we have, but in such a way as work smoothly with recent 
ubuntu releases.  Currently we have the firewall rules in a "tables" 
script in /etc/init.d and then link to it in /etc/rc2.d as per the usual 
Debian convention.

One of my colleagues recently rebuilt the mail server using Karmic 9.10, 
so I asked him if he was using ufw:  "uf what?  I'm just running the 
tables script after networking is finished."  OK, let me see what's 
going on:

notice that there is no networking in /etc/rc2.d, so this has been 
cd /etc/init, notice that, actually, there is a ufw service:
    start on net-device-added INTERFACE=lo
hmmm, is this going to be a problem, given that we have a completely 
separate iptables set up?  What emits the net-device-added event?  When 
is this run vis' a vis the /etc/rc2.d scripts?

(interject a comment from the previous discussion:)
"First is that if the service a job represents emits an event, it uses
the (purely documentation) "emits" stanza in its job file.  That way you
can get a rough idea by parsing /etc/init/*.conf

     $ grep "emits local-filesystems" /etc/init/*.conf
     /etc/init/mountall.conf:emits local-filesystems

So local-filesystems comes from the mountall service."

     root at dell8:/etc/init# grep "emits net-device-added" *
     root at dell8:/etc/init#

     root at dell8:/etc/init# grep net-device-added *
     network-interface.conf:start on net-device-added
     ufw.conf:start on net-device-added INTERFACE=lo

nothing.  Maybe /etc/init/networking.conf emits net-device-added?  How 
can one find out for sure?

OK, I wonder how/when the legacy /etc/rc2.d scripts get run.  Notice 
that there is an /etc/init/rc.conf file with
     start on runlevel [0123456]

OK, well what service emits a runlevel event?

     root at dell8:/etc/init# grep "emits runlevel" *
     root at dell8:/etc/init#

Again, nothing.  Presumably rc-sysinit.conf emits a runlevel event? 
Again, how can one find out for sure?  In the absence of better 
documentation, putting together the pieces of how services are started 
can be confusing.

Next, suppose I don't want to run ufw -- what's the procedure for 
turning this service off?  Deleting the ufw.conf script from /etc/init? 
  This seems terribly irreversible.

More information about the Ubuntu-devel-discuss mailing list