Вы находитесь на странице: 1из 44

System initialization

Unit objectives
 Outline steps necessary to boot a
Course ILT

Linux system, configure LILO and


GRUB boot loaders, and dual boot
Linux with Windows
 Understand how the init daemon
initializes the system at boot time
 Understand keyboard map files and
use them to change key sequences
Topic A
 Topic A: Booting and boot loaders
 Topic B: Runlevels
Course ILT

 Topic C: Defining and changing key


sequences
The boot process
 Bios functions
– Power-on self test (POST)
Course ILT

 Tests hardware components


 Searches for boot device
 Master boot record (MBR)
– 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
 Init (initialize daemon)
– Loads other system daemons
Course ILT The boot process
Course ILT Activity A-1

Discussing the boot process


Boot loaders
 Loads the Linux kernel into memory
 May perform other functions
Course ILT

– Pass system configuration to kernel


– Select different kernel versions
– Boot other OSs
 The two most common boot loaders
– LILO
– GRUB
Course ILT LILO boot loader screen
Common LILO keywords
 /etc/lilo.conf
– The LILO configuration file
Course ILT

continued
Course ILT Common LILO keywords, continued

continued
Course ILT Common LILO keywords, continued
Course ILT LILO error codes
Course ILT Activity A-2

Configuring LILO
GRUB
 GRand Unified Bootloader (GRUB)
– Resembles common UNIX boot loaders
Course ILT

– Newer than LILO


– First major part typically resides on the
MBR
– Remaining parts reside in the /boot/grub
directory
Course ILT GRUB boot loader screen
GRUB configuration boot loader screen
Course ILT
GRUB prompt boot loader screen
Course ILT
Course ILT GRUB boot loader help screen
Course ILT Activity A-3

Installing and configuring GRUB


Dual booting
 Dual boot
– Configuration in which two or more
Course ILT

operating systems exist on the hard disk


 Using LILO or GRUB, it is easiest if
Linux is installed after the other
operating system has been installed
Course ILT Partitioning for a dual boot system
Choosing boot loader for a dual boot system
Course ILT
FIPS
 First non-destructive Interactive
Partition Splitter (FIPS)
Course ILT

– 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
Using FIPS
 Guidelines/limitations to using FIPS:
– Version 2.0 supports the FAT16 and
Course ILT

FAT32 filesystems only


– Will work only with primary Windows
partition
– Will not resize logical drives within
extended partitions
– Works by splitting the Windows partition
into two primary partitions
– There must be sufficient free space
within the existing Windows to allow for
the installation of Linux
Course ILT Activity A-4

Resizing a Windows partition by


using FIPS
Topic B
 Topic A: Booting and boot loaders
 Topic B: Runlevels
Course ILT

 Topic C: Defining and changing key


sequences
Linux initialization
 init
– The first daemon process on the system
Course ILT

– Starts the other daemons


– Stops daemons at shutdown
 /etc/inittab
– The configuration file for the init daemon
Runlevels
 Runlevel
– Defines the type and number of
Course ILT

daemons started
– Runlevels are often called initstates
Course ILT Linux runlevels

continued
Course ILT Linux runlevels, continued
Runlevel commands
 runlevel command
– Used to display the current and most
Course ILT

recent previous runlevels


 init command
– Used to change from one runlevel to
another
 telinit command
– An alias to the init command
The /etc/inittab file
 Defines the daemons that run at each
runlevel
Course ILT

 /etc/rc.d/rc.sysinit
– The first script executed during system
startup
 Initializes the hardware
 Sets environment variables such as PATH
and HOSTNAME
 Checks filesystems
 Performs system tasks needed for daemon
loading
Course ILT Startup using /etc/rc.d/rc.sysinit
Course ILT Startup using /etc/rc.d/rc*.d
The /etc/inittab file, continued
 Mingetty
– Program used to display a login prompt
Course ILT

on a character-based terminal
 /etc/rc.d/rc.local
– Final script executed during system
startup
Course ILT Linux initialization process
Course ILT Activity B-1

Exploring runlevels and changing


runlevels
Configuring daemon startup
 /etc/rc.d/rc*.d
– The directories used to start and kill
Course ILT

daemons in each runlevel


 /etc/rc.d/init.d
– The directory in which most daemons are
located
Results of the ntsysv—level 5 command
Course ILT
Course ILT Activity B-2

Starting fake daemons


Topic C
 Topic A: Booting and boot loaders
 Topic B: Runlevels
Course ILT

 Topic C: Defining and changing key


sequences
Defining and changing key sequences

 The keyboard map is a text file that


has a standard format
Course ILT

 There are many keyboard map files


 Each file is for a different physical
keyboard layout
Course ILT Activity C-1

Modifying Ctrl + Alt + Del


Course ILT Activity C-2

Changing key sequences


Unit summary
 Learned about the boot sequence,
configured LILO and GRUB boot
Course ILT

loaders, and learned about dual boot


configurations
 Learned about how the init daemon
initializes the system at boot time, and
different runlevels
 Learned about keyboard map files and
used them to change keyboard key
sequences

Вам также может понравиться