Chapter 3. Boot Process, Init, and Shutdown 73
• Scripts used to bring up and down ISDN interfaces, such as ifup-isdn and ifdown-isdn
• Various shared network function scripts which should not be edited directly.
For more information on the network-scripts directory, see Chapter 13
• rhn — This directory contains the configuration files for the Red Hat Network Registration
Client, the Red Hat Update Agent Configuration Tool, the Red Hat Update Agent, and the Red
Hat Update Agent panel applet as well as the systemid and GPG keys. No files in this directory
should be edited by hand. For more information on the Red Hat Network, see the Red Hat Network
website at the following URL: https://rhn.redhat.com/.
3.4. Init Runlevels
The idea behind operating different services at different runlevels revolves around the fact that dif-
ferent systems can be used in a different ways. Some services cannot be used until the system is in a
particular state, or mode, such as ready for more than one user or has networking available.
There are times in which you may want to operate the system at a lower mode, such as fixing disk
corruption problems in runlevel 1, when no other users can possibly be on the system or leaving a
server in runlevel 3 without an X session running. In these cases, running services that depend upon
a higher system mode to function does not make sense because they will not work correctly anyway.
By already having each service assigned to start when its particular runlevel is reached, you ensure
an orderly start up process and can quickly change the mode of the machine without worrying about
which services to manually start or stop.
Generally, Red Hat Linux operates in runlevel 3 or runlevel 5 — both full multi-user modes. The
following runlevels are defined in Red Hat Linux:
• 0 — Halt
• 1 — Single-user mode
• 2 — Not used (user-definable)
• 3 — Full multi-user mode
• 4 — Not used (user-definable)
• 5 — Full multi-user mode (with an X-based login screen)
• 6 — Reboot
The default runlevel for a system to boot into and stop is configured in /etc/inittab. For more
information on /etc/inittab, see Section 3.2.3.
Feel free to configure runlevels 2 and 4 as you see fit. Many users configure those runlevels in a way
that makes the most sense for them while leaving the standard runlevels 3 and 5 alone. This allows
them to quickly move in and out of their custom configuration without disturbing the normal set of
features at the standard runlevels.
If your machine gets into a state where it will not boot due to a bad /etc/inittab or will not let you
log in because you have a corrupted /etc/passwd (or if you have simply forgotten your password),
boot into single-user mode.
If you are using LILO, you can enter single-user mode by typing linux single at the LILO boot:
prompt.
If you are using GRUB as your boot loader, you can enter single-user mode using the following steps.
Commenti su questo manuale