Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
inittab(5)
Edit
PageHistory
Diff
Info
LikePages
!!!INITTAB ---- !!NAME inittab - format of the inittab file used by the sysv-compatible init process !!DESCRIPTION The __inittab__ file describes which processes are started at bootup and during normal operation (e.g. /etc/init.d/boot, /etc/init.d/rc, gettys...). init(8) distinguishes multiple ''runlevels'', each of which can have its own set of processes that are started. Valid runlevels are __0__-__6__ plus __A__, __B__, and __C__ for __ondemand__ entries. An entry in the __inittab__ file has the following format: ''id'':''runlevels'':''action'':''process'' Lines beginning with `#' are ignored. ''id'' is a unique sequence of 1-4 characters which identifies an entry in __inittab__ (for versions of sysvinit compiled with the ''old'' libc5 ( '' Note: traditionally, for getty and other login processes, the value of the ''id'' field is kept the same as the suffix of the corresponding tty, e.g. __1__ for __tty1__. Some ancient login accounting programs might expect this, though I can't think of any. ''runlevels'' lists the runlevels for which the specified action should be taken. ''action'' describes which action should be taken. ''process'' specifies the process to be executed. If the process field starts with a `+' character, __init__ will not do utmp and wtmp accounting for that process. This is needed for gettys that insist on doing their own utmp/wtmp housekeeping. This is also a historic bug. The ''runlevels'' field may contain multiple characters for different runlevels. For example, __123__ specifies that the process should be started in runlevels 1, 2, and 3. The ''runlevels'' for __ondemand__ entries may contain an __A__, __B__, or __C__. The ''runlevels'' field of __sysinit__, __boot__, and __bootwait__ entries are ignored. When the system runlevel is changed, any running processes that are not specified for the new runlevel are killed, first with SIGTERM , then with SIGKILL . Valid actions for the ''action'' field are: __respawn__ The process will be restarted whenever it terminates (e.g. getty). __wait__ The process will be started once when the specified runlevel is entered and __init__ will wait for its termination. __once__ The process will be executed once when the specified runlevel is entered. __boot__ The process will be executed during system boot. The ''runlevels'' field is ignored. __bootwait__ The process will be executed during system boot, while __init__ waits for its termination (e.g. /etc/rc). The ''runlevels'' field is ignored. __off__ This does nothing. __ondemand__ A process marked with an __ondemand__ runlevel will be executed whenever the specified __ondemand__ runlevel is called. However, no runlevel change will occur (__ondemand__ runlevels are `a', `b', and `c'). __initdefault__ An __initdefault__ entry specifies the runlevel which should be entered after system boot. If none exists, __init__ will ask for a runlevel on the console. The ''process'' field is ignored. __sysinit__ The process will be executed during system boot. It will be executed before any __boot__ or __bootwait__ entries. The ''runlevels'' field is ignored. __powerwait__ The process will be executed when the power goes down. Init is usually informed about this by a process talking to a UPS connected to the computer. __Init__ will wait for the process to finish before continuing. __powerfail__ As for __powerwait__, except that __init__ does not wait for the process's completion. __powerokwait__ This process will be executed as soon as __init__ is informormed that the power has been restored. __powerfailnow__ This process will be executed when __init__ is told that the battery of the external UPS is almost empty and the power is failing (provided that the external UPS and the monitoring process are able to detect this condition). __ctrlaltdel__ The process will be executed when __init__ receives the SIGINT signal. This means that someone on the system console has pressed the __CTRL-ALT-DEL__ key combination. Typically one wants to execute some sort of __shutdown__ either to get into single-user level or to reboot the machine. __kbrequest__ The process will be executed when __init__ receives a signal from the keyboard handler that a special key combination was pressed on the console keyboard. The documentation for this function is not complete yet; more documentation can be found in the kbd-x.xx packages (most recent was kbd-0.94 at the time of this writing). Basically you want to map some keyboard combination to the alt keycode 103 = !KeyboardSignal !!EXAMPLES This is an example of a inittab which resembles the old Linux inittab: # inittab for linux id:1:initdefault: rc::bootwait:/etc/rc 1:1:respawn:/etc/getty 9600 tty1 2:1:respawn:/etc/getty 9600 tty2 3:1:respawn:/etc/getty 9600 tty3 4:1:respawn:/etc/getty 9600 tty4 This inittab file executes __/etc/rc__ during boot and starts gettys on tty1-tty4. A more elaborate __inittab__ with different runlevels (see the comments inside): # Level to run in id:2:initdefault: # Boot-time system configuration/initialization script. si::sysinit:/etc/init.d/rcS # What to do in single-user mode. ~:S:wait:/sbin/sulogin # /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 # What to do at the !!FILES /etc/inittab !!AUTHOR __Init__ was written by Miquel van Smoorenburg (miquels@cistron.nl). This manual page was written by Sebastian Lederer (lederer@francium.informatik.uni-bonn.de) and modified by Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de). !!SEE ALSO init(8), telinit(8) ----
13 pages link to
inittab(5)
:
Man5i
console(4)
inittab
initscript(5)
rcS(5)
sulogin(8)
utmp(5)
wtmp(5)
SIGHUP
init(8)
getty(8)
XFree86Notes
SoekrisPXEBootHowto
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.