Chapter 1. Boot Process, Init, and Shutdown 7The /etc/rc.serial script is used if serial ports must be setup at boot time. This script runssetserial commands to configure the system’s serial ports. Refer to the setserial man pagefor more information.1.4. SysV Init RunlevelsThe SysV init runlevel system provides a standard process for controlling which programs initlaunches or halts when initializing a runlevel. SysV init was chosen because it is easier to use andmore flexible than the traditional BSD-style init process.The configuration files for SysV init are located in the /etc/rc.d/ directory. Within this directory,are the rc, rc.local, rc.sysinit, and, optionally, the rc.serial scripts as well as the followingdirectories:init.d/rc0.d/rc1.d/rc2.d/rc3.d/rc4.d/rc5.d/rc6.d/The init.d/ directory contains the scripts used by the /sbin/init command when controllingservices. Each of the numbered directories represent the six default runlevels configured by defaultunder Red Hat Enterprise Linux.1.4.1. RunlevelsRunlevels are a state, or mode, defined by the services listed in the SysV /etc/rc.d/rc x .d/directory, where x is the number of the runlevel.The idea behind SysV init runlevels revolves around the idea that different systems can be used indifferent ways. For example, a server runs more efficiently without the drag on system resourcescreated by the X Window System. Or there may be times when a system administrator may needto operate the system at a lower runlevel to perform diagnostic tasks, like fixing disk corruption inrunlevel 1.The characteristics of a given runlevel determines which services are halted and started by init.For instance, runlevel 1 (single user mode) halts any network services, while runlevel 3 starts theseservices. By assigning specific services to be halted or started on a given runlevel, init can quicklychange the mode of the machine without the user manually stopping and starting services.The following runlevels are defined by default for Red Hat Enterprise Linux:• 0 — Halt• 1 — Single-user text mode• 2 — Not used (user-definable)• 3 — Full multi-user text mode• 4 — Not used (user-definable)• 5 — Full multi-user graphical mode (with an X-based login screen)• 6 — Reboot