Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.

Similar presentations


Presentation on theme: "Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration."— Presentation transcript:

1 Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration

2 The Complete Guide to Linux System Administration2 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

3 The Complete Guide to Linux System Administration3 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

4 The Complete Guide to Linux System Administration4 Hardware Initialization (continued) After PC-type computer started: –CPU initializes itself Sends signals to control other parts of computer –BIOS performs power-on self test (POST) Checks memory and other hardware –BIOS sends signal to SCSI controller card telling it to initialize itself SCSI controllers usually contain own BIOS

5 The Complete Guide to Linux System Administration5 Hardware Initialization (continued) After PC-type computer started (continued): –Other hardware components instructed to initialize themselves –BIOS determines which devices to search for operating system BIOS loads boot loader into memory and passes control it

6 The Complete Guide to Linux System Administration6 Hardware Initialization (continued)

7 The Complete Guide to Linux System Administration7 The Boot Loader Boot loader or boot manager –Small program loaded by BIOS 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

8 The Complete Guide to Linux System Administration8 The Boot Loader (continued)

9 The Complete Guide to Linux System Administration9 The Boot Loader (continued) Chained boot loader –One boot loader passes control to another boot loader instead of operating system Use boot loader to start different versions of Linux installed on separate partitions

10 The Complete Guide to Linux System Administration10 The Boot Loader (continued) uname command –Display information about kernel –Full version number of current kernel uname -a –Timestamp of kernel uname -v

11 The Complete Guide to Linux System Administration11 Starting the Kernel Initial piece of kernel –Loads rest of kernel into memory –Uncompresses it dmesg command –View messages stored by kernel during boot process

12 The Complete Guide to Linux System Administration12 Starting the Kernel (continued)

13 The Complete Guide to Linux System Administration13 Starting the Kernel (continued) Kernel ring buffer –Area of memory –Stores messages from kernel

14 The Complete Guide to Linux System Administration14 Using Boot Parameters Boot parameters –Instruct Linux how to operate or access parts of computer system’s hardware –Use to activate features of Linux To enter –GRUB Press “a” –LILO Enter after operating system name

15 The Complete Guide to Linux System Administration15 Configuring Boot Loaders Configuration files –Created by installation program –Examine how boot loader operates –Usually no need to change

16 The Complete Guide to Linux System Administration16 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 –MBR –Boot record you have indicated

17 The Complete Guide to Linux System Administration17 Using LILO (continued) Boot image –Each version of Linux Parameters –boot –delay –image –other

18 The Complete Guide to Linux System Administration18 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

19 The Complete Guide to Linux System Administration19 Using GRUB (continued)

20 The Complete Guide to Linux System Administration20 init and its Scripts init program –Master control program –Starts many other programs –Runs scripts to initialize system services –Controlled by /etc/inittab configuration file Three main configuration files located in /etc/rc.d –rc.sysinit –rc –rc.local

21 The Complete Guide to Linux System Administration21 Understanding Run Levels Run level –Numbered mode of operation –Preconfigured set of services is activated –Defined in /etc/inittab file –Default run level 5 init or telinit command –Change to different run level –Commonly done only to restart or halt system

22 The Complete Guide to Linux System Administration22 Understanding Run Levels (continued)

23 The Complete Guide to Linux System Administration23 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 Each run level is associated with subdirectory –Located in /etc/rc.d directory

24 The Complete Guide to Linux System Administration24 Understanding rc Scripts (continued) Each file begins with K or S followed by two-digit number –Begin with K―stopped (killed) –Begin with S―started Files symbolic links to scripts that stop and start services

25 The Complete Guide to Linux System Administration25 Understanding rc Scripts (continued)

26 The Complete Guide to Linux System Administration26 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

27 The Complete Guide to Linux System Administration27 Managing Services service command –Control service –Must know service name –Examples: service lpd restart service named start service named status

28 The Complete Guide to Linux System Administration28 Managing Services (continued) chkconfig command –Alter files in run-level directories –Modify services started or stopped each time system started –By default alters run levels 2 through 5 –Example: chkconfig named on

29 The Complete Guide to Linux System Administration29 Managing Services Graphically Service configuration utility –Main window lists services available on system Determined by contents of /etc/rc.d/init.d –Active services Shown with check mark next to them

30 The Complete Guide to Linux System Administration30 Managing Services Graphically (continued)

31 The Complete Guide to Linux System Administration31 Configuring System Services Initialization scripts in /etc/rc.d/init.d –Typically use configuration information located in /etc/sysconfig directory and subdirectories Files in /etc/sysconfig –Namedfor services –Each file contains name-value pairs Define configuration options for service

32 The Complete Guide to Linux System Administration32 Configuring System Services (continued) Use system-config-network utility to configure –/etc/sysconfig/ network file –Files within /etc/sysconfig/network-scripts 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

33 The Complete Guide to Linux System Administration33 Shutting Down Linux Turning off Linux computer without shutting it down in orderly way can cause data loss Journaling file system –Tracks each disk operation to ensure it is either completed or not done at all –Journal permits operating system to “back out” of disk operation if not completed successfully

34 The Complete Guide to Linux System Administration34 Shutting Down Linux (continued) Journaling file system –Means file systems are unlikely to ever be corrupted by power loss 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

35 The Complete Guide to Linux System Administration35 Shutting Down Linux (continued) Shut down Linux gracefully –Use reboot command –Use halt command –Use shutdown command –Pressing Ctrl+Alt+Del –Entering the command telinit 0 Halt system –Entering command telinit 6 Restart system

36 The Complete Guide to Linux System Administration36 Shutting Down Linux (continued) Graphical desktop –Use log out item on main menu of GNOME or KDE On servers or multiuser Linux systems –Only system administrator should be allowed to shut down system

37 The Complete Guide to Linux System Administration37 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

38 The Complete Guide to Linux System Administration38 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

39 The Complete Guide to Linux System Administration39 Summary (continued) Run level mode of operation defines what processes are started at boot time Must gracefully shut down Linux to avoid data loss


Download ppt "Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration."

Similar presentations


Ads by Google