Information AboutInit |
| CATEGORIES ABOUT INIT | |
| unix | |
|
init (short for " Initialization ") is the program on Unix and Unix-like systems which spawns all other processes. It runs as a Daemon and typically has PID 1. The functionality of init diverged considerably between BSD and System V , and users should consult their system manuals to determine which version is present. The standard init system used on most Linux Distributions is compatible with System V init, but some distributions, such as Slackware , use a BSD-style init system and others, such as Gentoo Linux , have customized init systems. There are also several alternative init schemes under development. BOOTING As well as being the first thing that runs on a booted system, init is the last thing run by the Kernel . Skipping init altogether "init" is not the only option when it comes to booting up a Unix box. On most modern Bootloaders (such as LILO or GRUB ), you can change which process the kernel spawns at the end of its initialization (the default being, of course, /sbin/init). This is generally done by typing init=/foo/bar at the bootloader's prompt. This is often useful for dropping a user directly to a Shell (like The Bourne Again Shell or Z Shell ). Appending init=/bin/bash, for example, will bring up a single root shell, without a password. If the system administrator feels this is insecure, they can always setup a BIOS password.BSD-style BSD init runs the initialization Shell Script located in ''Advantages:'' Simple and easy to edit manually. ''Problems:'' Where this scheme fails is in its scalability. If a 3rd-party package needs to have an initialization script run during the boot procedure, it needs to edit one of the existing boot scripts. Such editing is dangerous, as boot scripts are fragile at the best of times. A simple mistake by the installer can lead to an unbootable system. SysV-style System V init examines the ''Advantages:'' They are flexible. They are scalable. ''Problems:'' They are complex and hard to navigate. Runlevels Runlevel s describe certain states of a machine, characterized by the processes run. There are generally 8 runlevels. These are the runlevels 0 to 6 and S or s, which are aliased to the same runlevel. Of these eight, 3 are so-called "reserved" runlevels: : 0. Halt : 1. Single user mode : 6. Reboot Runlevel 5 is the most common runlevel, as it is the default on SUSE and Mandriva , among others. In these distributions, runlevel 5 is a multiuser graphical environment running X , usually with a Display Manager such as Xdm , Kdm or Gdm running. However, in the Solaris operating system, runlevel 5 is typically reserved to shutdown and automatically poweroff the machine, and runlevels 2 and 3 are the standard multi-user modes. Aside from runlevels 0, 1, and 6, every Unix system treats runlevels a little differently. The common denominator is the /etc/inittab file, which defines what each runlevel does (if they do anything at all). The runlevel is generally changed by Root running the telinit or init commands, depending on your flavor of Unix. SEE ALSO
EXTERNAL LINKS
|
|
|