linux+ guide to linux certification chapter nine system initialization
TRANSCRIPT
![Page 1: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/1.jpg)
Linux+ Guide to Linux Certification
Chapter Nine
System Initialization
![Page 2: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/2.jpg)
ObjectivesObjectives
• Summarize the major steps necessary to boot a Linux system
• Configure the LILO boot loader
• Configure the GRUB boot loader
• Dual boot Linux with the Windows operating system using LILO, GRUB, and NTLOADER
• Understand how the init daemon initializes the system at boot time
![Page 3: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/3.jpg)
The Boot ProcessThe Boot Process
• Power On Self Test (POST)– Initial series of tests run when a computer is powered
on to ensure that hardware components are functional
• Master Boot Record (MBR)– Small program normally located on the first sector of
the first hard disk drive used to define partitions and a boot loader
• Boot loader– Program used to load an operating system
![Page 4: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/4.jpg)
The Boot ProcessThe Boot Process
• Active partition– Partition that the MBR points to
• /boot– Directory that contains the kernel and boot-
related files
• Vmlinuz-<kernel version>– The Linux kernel file
![Page 5: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/5.jpg)
The Boot ProcessThe Boot Process
• Daemon– A Linux system process that provides a certain
service
• Init (initialize) daemon– The first process started by the Linux kernel– It is responsible for starting and stopping other
daemons
![Page 6: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/6.jpg)
The Boot ProcessThe Boot Process
Figure 9-1: The boot process
![Page 7: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/7.jpg)
Boot LoadersBoot Loaders
• The primary function of boot loaders during the boot process is to load the Linux kernel into memory
• Boot loaders may perform other functions as well
• The two most common boot loaders:– LILO– GRUB
![Page 8: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/8.jpg)
LILOLILO
Figure 9-2: LILO boot loader screen
![Page 9: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/9.jpg)
LILOLILO
• /etc/lilo.conf– The LILO configuration file
Table 9-1: Common /etc/lilo.conf keywords
![Page 10: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/10.jpg)
LILOLILO
Table 9-1 (continued): Common /etc/lilo.conf keywords
![Page 11: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/11.jpg)
LILOLILO
Table 9-1 (continued): Common /etc/lilo.conf keywords
![Page 12: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/12.jpg)
LILOLILO
• Almost any hardware information may be passed to the kernel via the append= keyword– The format of the information depends on the
type of hardware involved
• To uninstall LILO from an active partition or the MBR, you may use the lilo –u command
![Page 13: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/13.jpg)
LILOLILO
Table 9-2: LILO error codes
![Page 14: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/14.jpg)
GRUBGRUB
• GRand Unified Bootloader (GRUB)– Resembles common UNIX boot loaders– More recent than the LILO boot loader– First major part of the GRUB loader typically
resides on the MBR– The remaining parts of the boot loader reside in
the /boot/grub directory
![Page 15: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/15.jpg)
GRUBGRUB
Figure 9-3: GRUB boot loader screen
![Page 16: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/16.jpg)
GRUBGRUB
• /boot/grub/grub.conf– The GRUB configuration file
• GRUB root partition– The partition containing the second stage of the
GRUB boot loader and the /boot/grub.conf file
![Page 17: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/17.jpg)
GRUBGRUB
• Normally, GRUB allows users to manipulate the boot loader during system startup– To prevent this, you may optionally password
protect GRUB modifications during boot time
• grub-md5-crypt command– Used to generate an encrypted password for use
in the /etc/grub/grub.conf file
![Page 18: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/18.jpg)
GRUBGRUB
Figure 9-4: GRUB configuration boot loader screen
![Page 19: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/19.jpg)
GRUBGRUB
Figure 9-5: GRUB prompt boot loader screen
![Page 20: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/20.jpg)
GRUBGRUB
Figure 9-6: GRUB boot loader help screen
![Page 21: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/21.jpg)
GRUBGRUB
• Recall that you are required to choose a boot loader during installation
• Grub-install command– Command used to install the GRUB boot loader
![Page 22: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/22.jpg)
Using LILO or GRUB to Dual Using LILO or GRUB to Dual Boot other Operating SystemsBoot other Operating Systems
• Dual boot– Configuration where two or more operating
systems exist on the hard disk of a computer
• If you are using LILO or GRUB to dual boot another operating system in addition to Linux, it is easiest if Linux is installed after the other operating system has been installed
![Page 23: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/23.jpg)
Using LILO or GRUB to Dual Using LILO or GRUB to Dual Boot other Operating SystemsBoot other Operating Systems
Figure 9-7: Partitioning for a dual boot system
![Page 24: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/24.jpg)
Using LILO or GRUB to Dual Using LILO or GRUB to Dual Boot other Operating SystemsBoot other Operating Systems
Figure 9-8: Choosing a boot loader for a dual boot system
![Page 25: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/25.jpg)
Using FIPSUsing FIPS
• First non-destructive Interactive Partition Splitter (FIPS)– Program used to create a new partition out of the
free space on an existing FAT16 or FAT32 partition
– Resizing the Windows partition using FIPS will preserve the Windows operating system on the Windows partition yet allow for free space to install Linux
![Page 26: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/26.jpg)
Using FIPSUsing FIPS
• Guidelines/limitations to using FIPS:– Version 2.0 of FIPS supports the FAT16 and FAT32
filesystems only
– FIPS will only work with primary Windows partition and will not resize logical drives within extended partitions
– FIPS works by splitting the Windows partition into two primary partition
– There must be sufficient free space within the existing Windows to allow for the installation of Linux once the partition for FIPS to use
![Page 27: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/27.jpg)
Using a Windows Boot Loader to Using a Windows Boot Loader to Dual Boot LinuxDual Boot Linux
• NTLOADER– Boot loader available with Windows NT/2000/XP– Can be used to display a screen at boot time that
prompts you to choose an operating system to boot
– Similar to LILO and GRUB
![Page 28: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/28.jpg)
Using a Windows Boot Loader to Using a Windows Boot Loader to Dual Boot LinuxDual Boot Linux
Figure 9-9: Configuration screen to put GRUB or LILO to the boot partition
![Page 29: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/29.jpg)
Using a Windows Boot Loader to Using a Windows Boot Loader to Dual Boot LinuxDual Boot Linux
• It is important to create a boot disk when prompted to do so during the installation
• Boot.ini– The file used to configure NTLOADER
![Page 30: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/30.jpg)
Using a Windows Boot Loader to Using a Windows Boot Loader to Dual Boot LinuxDual Boot Linux
Figure 9-10: Dual boot operating system choice screen at start up
![Page 31: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/31.jpg)
Linux InitializationLinux Initialization
• Once a boot loader loads the Linux operating system kernel into memory, the kernel resumes control and executes the first daemon process on the system called init
• /etc/inittab– The configuration file for the init daemon
![Page 32: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/32.jpg)
RunlevelsRunlevels
• Runlevel– Term that defines a certain type and number of
daemons on a Linux system– Since the init daemon is responsible for starting
and stopping daemons and hence changing runlevels, runlevels are often called initstates as well
![Page 33: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/33.jpg)
RunlevelsRunlevels
Table 9-3: Linux runlevels
![Page 34: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/34.jpg)
RunlevelsRunlevels
Table 9-3 (continued): Linux runlevels
![Page 35: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/35.jpg)
RunlevelsRunlevels
• runlevel command– Command used to display the current and most
recent previous runlevel
• init command– Command used to change the operating system
from one runlevel to another
• telinit command– An alias to the init command
![Page 36: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/36.jpg)
The /etc/inittab FileThe /etc/inittab File
• When the init daemon needs to change the runlevel of the system by starting or stopping daemons, it consults the /etc/inittab file
• /etc/rc.d/rc.sysinit– The first script executed during system startup
![Page 37: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/37.jpg)
The /etc/inittab FileThe /etc/inittab File
Figure 9-11: System startup as a result of /etc/rc.d/rc.sysinit
![Page 38: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/38.jpg)
The /etc/inittab FileThe /etc/inittab File
Figure 9-12: System startup as a result of /etc/rc.d/rc*.d
![Page 39: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/39.jpg)
The /etc/inittab FileThe /etc/inittab File
• Mingetty– Program used to display a login prompt on a
character-based terminal
• /etc/rc.d/rc.local– Final script executed during system startup
![Page 40: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/40.jpg)
The /etc/inittab FileThe /etc/inittab File
Figure 9-13: The Linux initialization process
![Page 41: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/41.jpg)
Configuring Daemon StartupConfiguring Daemon Startup
• /etc/rc.d/rc*.d– The directories used to start and kill daemons in
each runlevel
• /etc/rc.d/init.d– The directory in which most daemons are located
![Page 42: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/42.jpg)
Configuring Daemon StartupConfiguring Daemon Startup
Figure 9-14: Results of ntsysv --level 5 command
![Page 43: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/43.jpg)
Chapter SummaryChapter Summary
• Boot loaders are typically loaded by the system BIOS from the MBR or the first sector of the active partition of a hard disk
• The boot loader is responsible for loading the Linux kernel
• The LILO boot loader uses the /etc/lilo.conf configuration file, whereas the GRUB boot loader uses the /boot/grub/grub.conf configuration file
• You may use the LILO or GRUB boot loader to dual boot Linux and the Windows operating system
![Page 44: Linux+ Guide to Linux Certification Chapter Nine System Initialization](https://reader035.vdocuments.mx/reader035/viewer/2022062322/56649cab5503460f9496ccc5/html5/thumbnails/44.jpg)
Chapter SummaryChapter Summary
• The FIPS utility may be used to split a FAT16 or FAT32 partition in order to create enough space to install Linux
• There are seven standard runlevels used to categorize a Linux system based on the number and type of daemons loaded in memory
• The init daemon is responsible for loading and unloading daemons using its configuration file /etc/inittab
• Daemons are typically stored in the /etc/rc.d/init.d directory and loaded at system startup from entries in the /etc/rc.d/rc*.d directories