image ResEx Logo
ResExcellence www : Powered by Google
Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets


Files are in Stuffit 5 or greater format.
Free download.

Tell us about a bad link.

Thank You!


Running
without a restart.

Managing Startup Init Processes Under Linux

When booting into Linux, pages of status messages flash across the screen. At one point when the activity slows to a human-readable pace, you may notice lines like:


Starting keytable succeeded [OK]
xfstt startup succeeded     [OK]
inetd startup succeeded     [OK]
pmud started                [OK]
atalkd startup succeeded    [OK]

These items are very similar to the control panels and extensions that load on the MacOS at boot time. And just like on the Mac, managing these items can make your computer boot faster.

If you have been playing with Linux for awhile, you've heard the phrase "runlevel" tossed around. Most commonly, people refer to booting into runlevel 5 for xwindows, or runlevel 3 for a text based login. Think of these runlevels as something similar to extension sets in the MacOS. There are a total of 7 runlevels with the common convention of 0 and 6 reserved for shutdown and reboot, level 3 for text login, and 5 boots into the xserver. The initial runlevel of a machine is determined in /etc/inittab:

id:5:initdefault:

All of the startup services scripts that load under these various runlevels are stored in the init directory. (Under MacOS 6, startup extensions and control panels were called inits, possibly a throwback to Unix.). Links from the init scripts to the runlevel directories (rc0.d-rc6..d) create the "extension sets". You can see the runlevel and init directories in /etc/rc.d/:

If you take a look inside /etc/rc.d/init.d, you can see all the services that are installed on your computer as shown below, yours may be different.

To find the function of these init scripts, open them in a text editor; they all have comments at the top. Below are three as an example:

##########################################
# portmap       Start/Stop RPC portmapper
#
# chkconfig: 345 11 89
# description: The portmapper manages RPC connections, which are used by
#              protocols such as NFS and NIS. The portmap server must be
#              running on machines which act as servers for protocols which
#              make use of the RPC mechanism.
# processname: portmap


###########################################
# pmud	       Power Manager daemon for Apple powerbooks
#
# chkconfig: 2345 40 60
# description: pmud is a daemon which periodically polls the PMU
#              (power manager) and performs functions such as enabling
#              or disabling devices appropriately when the power source
#              changes.
# processname: pmud


###########################################
# netfs         Mount network filesystems.
#
# Authors:	Bill Nottingham <notting@redhat.com>
# 		Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#
# chkconfig: 345 25 75
# description: Mounts and unmounts all Network File System (NFS),
#	       SMB (Lan Manager/Windows), and NCP (NetWare) mount points.

Just like on the MacOS, you will need to make some decisions as to which services you want to enable. In my case, referring to the three scripts listed above, my Powerbook doesn't access any network file systems, so I disabled portmap and netfs, but because I need power management pmud is enabled.

Now you know where to look for the services installed on your computer (/etc/rc.d/init.d) and where links to these scripts are grouped to create the different runlevels, but how do you manage this information?

There is a program called tksysv that manages these processes and runlevels graphically in X. If you use KDE, there is a similar, slightly more featured program called ksysv.

After launching tksysv you'll see a list of the installed inits on the left, and columns representing the different runlevels. For the most part, you just need to concern yourself with which services get Started, not Stopped. Use the Add/Remove buttons to manage the different runlevels.

Sometimes under the MacOS, an extension conflict can be solved by renaming the offending extension to move it higher or lower in the boot order. Under Linux, services in each runlevel are assigned a number. Use this number to change the load order of specific init scripts.

As a desktop machine, not a server, I find my Powerbook runs with about a dozen init services. It boots much faster and uses less RAM.

However, unlike the MacOS, is you create an unbootable runlevel, you can't start the computer without inits by holding the shift key! If you find yourself in this situation, you can change the runlevel that Linux boots into from the yaboot.conf by adding: append = "3"

My recommendation is to work on one runlevel at a time. For example, if you are working on runlevel 5, make sure it will boot and shutdown cleanly before moving on to runlevel 3.

Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets

Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement. [an error occurred while processing this directive]