These Things Matter to Me
Tuesday, April 11, 2006
  Ubuntu, Debian: Default Init Level is Init 2. Not 5. Note to Self!
(Some notes I should have written here a long time ago.)
Ubuntu and Debian's default runlevel is 2. Here are two places where knowing that is kinda important:

1. Graphics configuration, troubleshooting.
Previously, my fave way of checking to see if my xorg.conf changes were making sense, was quickly to duck out and in of the X server, by running:
# vi /etc/X11/xorg.conf
(make radical changes)
# init 3 ; init 5
(wait)
Graphics go, graphics come back with changes. Results come in. This is great on Redhat, Fedora, and SUSE. Ubuntu? Not so much. The GUI is running in both init 3 and init 5! The graphics never go! Doh. Plus, you're living only in init 2 anyway, by default. So there goes that trick...

My Ubuntu (and Debian) workaround:
(ctrl-alt-F1 to drop to GUI-less console)
# vi /etc/X11/xorg.conf
(make radical changes)
# /etc/init.d/gdm stop
# /etc/init.d/gdm start
2. Writing, or copying in new start-up scripts so that services/ daemons run at start up.
On Redhat, I can copy a start-up script to /etc/init.d, then make the S(number)(service) link in /etc/rc3.d, and /etc/rc5.d.
# cp awesomed.sh /etc/init.d/awesomed
# ln -s /etc/init.d/awesomed /etc/rc3.d/S99awesomed
# ln -s /etc/init.d/awesomed /etc/rc5.d/S99awesomed
This is great in Redhat-land. But because the default runlevel is 2 in Ubuntu, this script will never called up. The correction?
# cp awesomed.sh /etc/init.d/awesomed
# ln -s /etc/init.d/awesomed /etc/rc2.d/S99awesomed
(and to be tidy and consistent)
# ln -s /etc/init.d/awesomed /etc/rc3.d/S99awesomed (though you'll likely never reach this init level)
# ln -s /etc/init.d/awesomed /etc/rc5.d/S99awesomed (though you'll likely never reach this init level)
Or you can just change your default runlevel to 3 or 5. Debian basically designs runlevels 2-5 to be identical, leaving it up to the administrator to customize from there.
 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home
probably a little too much

About
Linux sysadmin. I cry when make fails. And during the Oscars. Every year.
Contact
andy: andiacts [at] gmail.com
Archives
September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / January 2009 / February 2009 /




Powered by Blogger

Subscribe to
Posts [Atom]