RHCSA Study Guide – Objective 1 : Booting

############################
Everything below are my raw notes that I took while attending an unofficial RHCSA training session.  I am posting them here in hopes they will assist others who may be preparing to take this exam.  

My notes are my own interpretation of the lectures, and are certainly not a replacement to classroom training either through your company, or by taking the official RHCSA classes offered through Red Hat.  If you are new to the Red Hat world, I strongly suggest looking into their training courses over at Red Hat.
############################

Basic things to know on test:
– Reset root passwd via single user mode

Upstart

RHEL 6 is now using upstart (upstart.ubuntu.com). SystemV stuff is finally getting deprecated, but inittab is still there.

Quick notes about Upstart:

- Upstart allows for faster boot times, running jobs concurrently
- Upstart is just used for startup/shutdown/service management.
- The only place I'll notice this on test is in /etc/inittab.  Specifically for modifying the runlevels within /etc/inittab.
- Configuration files are in /etc/init : These tell the services how to handle events such as ctrl-alt-delete, runlevels, etc.

Runlevels:

0 : os stopped
1 : single
2 : multi-user, no NFS shares
3 : full multiuser, TUI
4 : unused
5 : full multiuser, GUI
6 : Reboot

Switch runlevels by:

telinit

(init is technically NOT the command, but works as legacy for now)

1. At bootup, kernel starts /sbin/init
2. The startup event causes /etc/init/rcS.conf to fire.
3. rcS.conf then greps out the /etc/inittab to get init level, and runs it.
4. These fires off /etc/init/rc.conf, which fires off the /etc/rc.d/rc script
5. All the startup scripts in /etc/rcX.d will get fired off accordingly.

EXAM NOTE: Nothing major is really needed for the exam on upstart. Obviously know run levels.

Init Scripts:
– To view all startup files for a run level, just look at:

ex.  runlevel 5 : /etc/rc.5.d
ex.  runlevel 3 : /etc/rc.3.d

Notes about identifiers:

- S means to start the service
- K means to kill the service
- After the S or K, there is a two digit number used for ordering the
execution of the scripts, ie.  priority...
- When entering run levels, kill scripts run first, then start scripts
- All the scripts reside in /etc/init.d.. they are just symlinked to the /etc/rc.X
- All these symlinks are just managed by chkconfig : When you just do:
chkconfig  on, it'll just default the service levels based off the defualts in the init script.

EXAM NOTE: Know how to use chkconfig

Grub

Grub is responsible for the initial kernel load at boot time.

EXAM NOTE: Probably won’t need to do much with /boot/grub/grub.conf

To get into command mode when system is booting, type:

c : command mode
e : edit mode
a : append mode
esc : brings you back to previous menu
enter : boots the machine based off your selection

To get into single user mode, add a ‘s’ or the word ‘single’ to the end of the kernel command line.

EXAM NOTE: This WILL be on test. Make sure you know how to reset lost root passwd

Lab:

1.  Reboot machine into single user mode and reset root passwd
2.  Review a few of the init.d scripts to get familiar
3.  Review the configuration files in /etc/init.