101.3 Change runlevels / boot targets and shutdown or reboot system Flashcards
Define run level.
A run level is a predefined configuration that the computer will operate within.
In how many run levels can a computer operate at a time?
One at a time only.
What is the purpose of Runlevel 1?
Single user mode. Used for maintenance tasks and repair functionality.
What is the purpose of runlevel 2?
Multiple users can log again, but without any networking interface nor are there any remote file systems mounted.
What is the purpose of runlevel 4?
Not used, but it is available should an administrator want to set up a custom run level environment
What is the purpose of runlevel 5?
Not used, but it is available should an administrator want to set up a custom run level environment
What is the purpose of runlevel 6?
Reboot runlevel (init stops services and restarts the system going back through the complete computer bootup sequence once again).
What is the purpose of runlevel 3?
Multiple users can log with networking capabilities.
How do you read the following in the /etc/inittab file?
id : 3 : initdefault _
: : :
Where are the scripts that init works with to get a system up and running?
In RHEL: /etc/rc.d
In Debian: /etc/init.d
Within /etc/rc.d/rc3.d directory (for runlevel 3), what do the numbers mean after the letters K and S?
The numbers after the letters indicate the numerical order in which the scripts are to be killed and started.
What is an advantage upstart has over init?
Upstart can start services in parallel to one another rather than waiting on one service to start before it could start up the next one.
What will happen if Upstart detects a service that has stopped working unexpectedly?
Upstart monitors the services that it works with. If a service stops working Upstart will attempt to get it running again.
Where will the Linux kernel look for an initialization daemon named init?
/sbin directory ( /sbin/init )
List the order of the init boot sequence.
/sbin/init > /etc/inittab > /etc/rc.d/rc.sysinit > /etc/rc.d/rcX.d > login
In the upstart boot sequence, as file systems come online, startup will run which script?
The /etc/init/rc-sysinit.conf script
What does the rc-sysinit.conf script do?
It tells init to switch into the default run level via the run level command.
What does Linux call a change in the system that would trigger an Upstart job?
An event
When will Upstart stop a service?
Upstart will only kill a service if an event calls for it or if an administrator manually stops it.
What is the initial state of an Upstart job?
Waiting. It isn’t doing anything yet, but is just waiting to do something.
What does the Starting state mean?
The starting state means that the job itself is about to start.
What does the Stopping state mean?
The stopping state is an interim state where the job has processed a section of its configuration known as pre-stop. The job is not actually stopping at this point.
What does the Running state of a job mean?
A job’s running state means that the job is running.
What does the killed state mean in Upstart?
The killed state is where the job is actually stopping.
What does the post-stop job state mean?
The post stop state is where the job has completely stopped.
What job state follows after post-stop?
It goes back into the waiting state.
What is the order of the Upstart jobs?
Waiting > Starting > Running > Stopping > Killed > Post-stop > (Waiting …)
What is an innovation of Systemd?
Systemd removed the need to have shell scripts.
What language is used to write Systemd functionalities?
Systemd functionalities are written in C code.
Is Systemd backwards compatible with System V bash init scripts?
Yes, they are, although systemd C code is faster, more robust and more efficient.
What does systemd use instead of bash init scripts?
Systemd utilizes what are known as unit files.