Professional Documents
Culture Documents
Objectives
Describe how standard PC hardware starts an operating system Configure how the LILO or GRUB boot loader starts the Linux kernel Configure the init program and the scripts used to start system services Manage system services after start-up
Hardware Initialization
Basic process for bootstrapping
CPU begins executing commands in BIOS BIOS passes control to boot loader Boot loader passes control to Linux kernel
Commonly used
LILO (Linux loader) GRUB (grand unified boot loader)
Default on most systems
BIOS looks for executable program in first sector of 3.5-inch disk or CD-ROM
Use boot loader to start different versions of Linux installed on separate partitions
Timestamp of kernel
uname -v
10
dmesg command
View messages stored by kernel during boot process
11
12
13
To enter
GRUB
Press a
LILO
Enter after operating system name
The Complete Guide to Linux System Administration 14
15
Using LILO
Simpler than GRUB To use
Create configuration file describing operating systems LILO should start Run lilo command
Examines lilo.conf file Stores appropriate information in either
Parameters
boot delay image other
17
Using GRUB
Installed by default for many versions of Linux /boot/grub/grub.conf
Configuration file for GRUB Similar in layout and syntax to lilo.conf
18
19
21
22
Understanding rc Scripts
rc script
Located in /etc/rc.d directory Started with parameter that includes run level Starts appropriate system services based on selected run level
23
24
25
Controlling Services
Many services listed in run-level directories relate to networking Scripts allow user to change almost anything on Linux system without restarting computer
26
Managing Services
service command
Control service Must know service name Examples:
service lpd restart service named start service named status
27
28
Active services
Shown with check mark next to them
29
30
Files in /etc/sysconfig
Named for services Each file contains name-value pairs
Define configuration options for service
31
system-config-securitylevel utility
Alters /etc/sysconfig/system-config-securitylevel file Based on firewall selections
Service itself often has another set of configuration files in /etc directory
The Complete Guide to Linux System Administration 32
33
Graceful shutdown
Orderly or methodical shutdown of Linux All Linux services are stopped All data is written to disk Kernel changes to run level 0 or 6
34
36
Summary
CPU BIOS and other hardware components of computer must initialize themselves before attempting to load operating system Boot loader typically first software loaded on Linux system Multiple boot loaders can be installed on one system and chained together Messages generated by kernel after it starts are stored in kernel ring buffer
The Complete Guide to Linux System Administration 37
Summary (continued)
Boot loader can pass parameters to Linux kernel LILO and GRUB configured using text configuration files
Stored in /boot directory
init program
First process started by Linux kernel Runs several scripts that start numerous daemons
38
Summary (continued)
Run level mode of operation defines what processes are started at boot time Must gracefully shut down Linux to avoid data loss
39