Adding Runlevel 3 to Karmic Koala

I’ve got a brand spanking new install on an Ubuntu machine that I would like to use as a home media server. Because it is ancient, I’d like to run it without windows. Theoretically, because Ubuntu is a Linux distribution and Linux is a Unix clone and the core of Unix was laid out in SysV, I ought to be able to use runlevel 3.

# network multiuser GUI servers
1 ✘ ✘ ✘ ✘
2 ✔ ✔ ✘ ✘
3 ✔ ✔ ✘ ✔
4 ✔ ✔ ✔ ✘
5 ✔ ✔ ✔ ✔
6 reboot

However, Ubuntu doesn’t implement the SysV runlevels. In Ubuntu there are three runlevels: 1, 2-5, & 6.

This article describes how to set up runlevels in Ubuntu 7.10 (Gutsy Gibbon), however, I’m using 9.10 (Karmic Koala).

I changed DEFAULT_RUNLEVEL in /etc/init/rc-sysinit.conf to 3 and ran:

  • sudo update-rc.d -f gdm remove
  • sudo update-rc.d -f gdm start 20 4 5 . stop 20 1 2 3 6 .

Which changed the runlevel on reboot, but didn’t stop GDM. What worked was to edit /etc/init/gdm.conf and change:

start on (filesystem
          and started hal
          and tty-device-added KERNEL=tty7
          and (graphics-device-added or stopped udevtrigger))

to:

start on (runlevel [45]
          and filesystem
          and started hal
          and tty-device-added KERNEL=tty7
          and (graphics-device-added or stopped udevtrigger))

I also want networking to start on boot, so I can disconnect the monitor since my KVM switch no longer switches.

Leave a Reply

Your email address will not be published. Required fields are marked *