FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next 

System startup - step II


  1. Init is the first process started once the kernel is loaded. Init handles starting all daemons and processes, restarting processes like getty which allow users to login, collecting orphan processes and shutting the system down. Since init is the parent process for all other process, configuring the tasks that are performed when the system starts up or shuts down is done by configuring init.
  2. The configuration file for init is /etc/inittab. Each line in the inittab file consists of:
  3. A sample inittab file with comments is shown below:

# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.8 1998/05/10 10:37:50 miquels Exp $

# The default runlevel.

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.

# What to do in single-user mode.

# /etc/init.d executes the S and K scripts upon change
# of runlevel. #
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0 l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# /sbin/getty invocations for the runlevels. #
# The "id" field MUST be the same as the last
# characters of the device (after "tty"). #
# Format: # <id>:<runlevels>:<action>:<process>
1:2345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3


  1. Make sure that console 4 is NOT active by trying to switch to this console.
    Modify inittab to start a fourth virtual console.
    Have init reread the configuration file.
    Verify that console 4 is active.
  2. Currently init is configured to reboot when ctrl-alt-del is pressed. Modify inittab so that the system changes to runlevel 1 when ctrl-alt-del is pressed. Make sure that you have init reread the configuration file. Press ctrl-alt-del to test your work.

Copyright © L.M.MacEwan
FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next