System Boot Up
System Boot Up
System Boot Up
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
Module files:
/boot/grub/*.mod
Generic settings
/etc/default/grub
Individual settings
/etc/grub.d/*
Script base
By order of the staring number on file name
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
initramfs
init
Modules...
Root
Filesystem
The init
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
chkconfiglist[name]
chkconfigadd<name>
chkconfigdel<name>
chkconfig[level<RL>]<name><on|off>
Shut down:
shutdownhnow
halt
poweroff
init0
Reboot:
shutdownrnow
reboot
init6