410 likes | 781 Views
System initialization. Unit objectives Outline steps necessary to boot a 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. Topic A. Topic A: Booting and boot loaders
E N D
System initialization Unit objectives • Outline steps necessary to boot a 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
Topic A • Topic A: Booting and boot loaders • Topic B: System initialization
The boot process • Bios functions • Power On Self Test (POST) • 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
Exercise A-1 Discussing the boot process
Boot loaders • Loads the Linux kernel into memory • May perform other functions • Pass system configuration to kernel • Select different kernel versions • Boot other OSes • The two most common boot loaders • LILO • GRUB
Common LILO keywords • /etc/lilo.conf • The LILO configuration file continued
Common LILO keywords, continued continued
Activity A-2 Installing and configuring LILO
GRUB • GRand Unified Bootloader (GRUB) • Resembles common UNIX boot loaders • Newer than LILO • First major part typically resides on the MBR • Remaining parts reside in the /boot/grub directory
Activity A-3 Configuring GRUB
Dual booting • Dual boot • Configuration where two or more 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
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
Using FIPS • Guidelines/limitations to using FIPS • Version 2.0 supports the FAT16 and FAT32 filesystems only • Will only work 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
Activity A-4 Resizing a windows partition using FIPS
Topic B • Topic A: Booting and boot loaders • Topic B: System initialization
Linux initialization • init • The first daemon process on the system • 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 daemons started • Runlevels are often called initstates
Linux runlevels continued
Runlevel commands • runlevel command • Used to display the current and most 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 • /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.
The /etc/inittab file, continued • Mingetty • Program used to display a login prompt on a character-based terminal • /etc/rc.d/rc.local • Final script executed during system startup
Activity B-1 Exploring and changing runlevels
Configuring 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
Activity B-2 Starting fake daemons
Unit summary • Learned about the boot sequence, configured LILO and GRUB boot loaders, and learned about dual boot configurations • Learned about how the init daemon initializes the system at boot time, and different runlevels