LPI 101 Ch09 Startup and Shutdown
LPI 101 Ch09 Startup and Shutdown
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Objectives
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Standard Boot Process (LILO)
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Standard Boot Process (LILO)
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Boot Problems
Sometimes, lilo will not able to boot the system, it prints the
letters LILO on screen. The problems: disk corrupted, the
information on disk geometry is incorrect, or since the new
kernel image is installed
Troubleshooting: boot the system from bootable CD or
floppy and try to repair disk problems or correct the
/etc/lilo.conf
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Manual Boot
There are times when lilo has loaded the kernel but the kernel
does NOT work properly because some of hardware can not
be found,…It’s possible to pass configuration to the kernel
through lilo at lilo command line when booting:
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Manual Boot
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Startup Flow Control
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Run Levels
Runlevel 0 Shutdown mode. Tasks: killing all processes
/etc/rc.d/rc0.d and unmounting file systems
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Run Levels
Runlevel 4 User defined run level
/etc/rc.d/rc4.d
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Run Levels Using
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Structure of /etc/inittab
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Structure of /etc/inittab
The main inittab action keywords are:
Off Do not run this command. Used to retain an entry but
to disable it.
wait Run command and wait for completion
once Run command but do not wait. Daemons processes
are often started this way
respawn Run command; If process exists, then rerun it. Used
for commands that have to start again after
completion, like getty and ttymon
sysinit Run command at first init
boot Run command at boot time but do not wait
bootwait Like boot but wait for completion
initdefault Defines default boot level
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
/etc/inittab
# more /etc/inittab
id:3:initdefault:
#System initialization
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Run Command Scripts
The run commands scripts are kept under /etc/rc.d/ and are
initiated by init with directions from /etc/inittab
The script called rc itself runs startup programs in sub-
directories under /etc/rc.d/
• rc 0 looks in /etc/rc.d/rc0.d for runlevel 0
• rc 1 looks in /etc/rc.d/rc1.d for runlevel 1
• rc 2 looks in /etc/rc.d/rc2.d for runlevel 2
• etc …
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Run Command Scripts
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Changing Run Levels
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Shuting Down
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102
Summary
SAIGONLAB 83 Nguyễn Thị Nhỏ, P9, Q.Tân Bình, Tp. HCM LPI 102