|Lesson 4||System boot scripts|
|Objective||List Linux system boot scripts and their functions.|
System boot scripts
The entire Linux boot process is governed by a series of scripts in the
directory, outlined in the following list:
The main system initialization script. This brings your machine up to an initial usable level; it is extremely unlikely that you will need to
interact with this script directly.
The system-local initialization script. This script performs a few system-local tasks; again, you will probably not need to interact with this
/etc/rc.d/init.d/* directory are a series of service-specific initialization scripts. For example,
Run-level symbolic links that automatically call service-specific initialization scripts during boot and shutdown according to the system run
What is the purpose of the rc.sysinit
A service's runlevel can be configured by using the Runlevel Editor accessed via the Control Panel.
During the system's first stage of booting, you will see messages from the
/etc/rc.d/rc.sysinit script. Most errors from this stage are kernel errors, which will be logged to
/var/log/dmesg. Some messages may, however, be logged to
/var/log/messages. If you encounter kernel errors, they are probably due to a hardware problem.
Note: Consult the hardware's documentation or the
Linux HOWTOs for specific hardware troubleshooting guidelines. It may be necessary for you to build a customized kernel to get your hardware to work properly.
System V init scripts
The system then runs scripts in the
directory. This directory, which is kept in a
init structure, holds all the commands necessary to control boot processes and subsystems. As the system starts these scripts, you'll see either
, indicating whether the service started successfully or not.
If there is an error, you should find some explanation in the system log file
If, after boot, you need to control a process or subsystem that started at boot time, use these scripts. For example, suppose you configured your
Red Hat Linux system to start the Apache Web server,
, at boot. If you need to control this process in some way, you should use the System V init scripts. You can perform a standard set of actions with the commands listed below:
For example, to restart
Display whether the service is running.
startStart the service.
stopStop the service.
restartStop the service, if it is running, and then restart it.
reloadMake the service reload its configuration; this may involve restarting.
httpd after a configuration change, issue the command:
To completely stop
httpd, you should use
Finally, after the system scripts in
/etc/rc.d/init.d run, the
/etc/rc.d/rc.local is run.
The next lesson describes common user login problems and their solutions.
System Boot Problems - Quiz
Before moving on to the next lesson, click the Quiz link below to check your understanding of boot problems.
System Boot Problems - Quiz
System V is an early version of UNIX that defined many characteristics of modern UNIX implementations.