0% found this document useful (0 votes)
68 views17 pages

System Boot Up

The document discusses the system boot up process including the BIOS, boot loader, kernel, initrd, and init process. It describes common Linux boot loaders like LILO, GRUB, and GRUB2. Details are provided on the stages of GRUB and how to configure and install it. The roles of the initrd, init process, and runlevels are explained. Methods for managing and controlling services are outlined including using init scripts, the service command, chkconfig, and initctl for Upstart.

Uploaded by

mancangkul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views17 pages

System Boot Up

The document discusses the system boot up process including the BIOS, boot loader, kernel, initrd, and init process. It describes common Linux boot loaders like LILO, GRUB, and GRUB2. Details are provided on the stages of GRUB and how to configure and install it. The roles of the initrd, init process, and runlevels are explained. Methods for managing and controlling services are outlined including using init scripts, the service command, chkconfig, and initctl for Upstart.

Uploaded by

mancangkul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Chapter 11

System Boot Up

Ref. Pge. 223


Boot Up Procedure

BlOS
To select a boot device

Loader
Provides menu selection
Loads kernel or other loaders

Kernel + initrd
The operating system
Mounts the root file system

init
The first running process of system
Ref. Pge. 239
Linux Loader

LILO
The LInux LOader
Depends on map strictly

GRUB
Grand Unified Bootloader
Supports kinds of file system
Interactive with user

GRUB2
Second version of GRUB
Big changing in configuration
Ref. Pge. 228
GRUB Stages

Stage 1
Stored in MBR
Loads stage 1.5

Stage 1.5
Stored in disk: /boot/grub/*_stage1_5
Reads and loads configuration files

Stage 2
Provides menu interface
Shell accessible
Loads kernel with parameters
Ref. Pge. 223
GRUB Configuration

/boot/grub/menu.lst
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
titleCentOS(2.6.18371.3.1.el5.centos.plus)
root(hd0,0)
kernel/boot/vmlinuz2.6.18
371.3.1.el5.centos.plusroroot=LABEL=/rhgbquiet
initrd/boot/initrd2.6.18
238.12.1.el5.centos.plus.img
titleCentOS(2.6.18194.32.1.el5)
root(hd0,0)
kernel/boot/vmlinuz2.6.18194.el5ro
root=LABEL=/rhgbquiet
initrd/boot/initrd2.6.18194.el5.img
Ref. Pge. 229
GRUB Install

grubinstall<disk>
Installs 1st stage into MBR

No need to run if configuration file is changed

Ref. Pge. 229


About GRUB 2

Module files:
/boot/grub/*.mod

Main configuration file


/boot/grub/grub.cfg
Updated by running updategrub
Never edit this file manually!

Ref. Pge. 233


Change setting of GRUB 2

Generic settings
/etc/default/grub

Individual settings
/etc/grub.d/*
Script base
By order of the staring number on file name

Must run grubupdate to take effect


Change setting of GRUB 2

Custom settings
/etc/grub.d/40_custom
Add lines at the bottom
Similar to GRUB 1:
menuentryMyLinux
setroot=(hd0,0)
kernel/boot/vmlinuz2.6.18194.el5ro
root=LABEL=/rhgbquiet
initrd/boot/initrd2.6.18194.el5.img

Ref. Pge. 234


The initrd/initramfs

Helps kernel to access the root file


system with modules built-in

Ram Disk loaded by loader


kernel

initramfs
init
Modules...

Root
Filesystem
The init

The first process loaded by kernel

Reads configuration file /etc/inittab

Determines runlevel and run


corresponding services:
0 - halt
1 - single user modes
2 - Multiuser, without NFS
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot
Ref. Pge. 240
Starting Services

Controlled by init
init /etc/inittab

/etc/rc.d/rc.sysinit

/etc/rc.d/rc

/etc/rc.d/rc<RL>.d

Knn*

Snn*
Manually Control Services

Controlled by service command:


service<name><sub_command>

Available sub commands:



start : start the service

stop : stop the service

restart : restart the service

reload : reload service configuration

status : show service current status

Ref. Pge. 243


Configure Runlevel Services

Use chkconfig command:

chkconfiglist[name]
chkconfigadd<name>
chkconfigdel<name>
chkconfig[level<RL>]<name><on|off>

Ref. Pge. 244


Shutting Down System

Shut down:
shutdownhnow
halt
poweroff
init0

Reboot:
shutdownrnow
reboot
init6

Ref. Pge. 247


About Upstart

A replacement of init and runlevel

Better handling on dynamic hardware


environment

Service controlling scripts are located


under /etc/init/ directory and
with .confextension

Daemons can be interacted by initctl


command
Using initctl

Communicates and interacts with upstart


daemon:
initctl<sub_command>
Available sub commands:

help: show help page

list: show all jobs

startname: start a job

stopname: stop a job

restartname: restart a job

statusname: show job status

reloadname: reload configuration

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy