Lab06.the Linux Boot Process
Lab06.the Linux Boot Process
MBR
BIOS Boot Sector Kernel
(Master Boot Record)
• Linux boot loaders can be installed into both the MBR or a boot sector
• Linux does NOT require the partition to be primary
• Most important Linux Boot Loaders are:
LILO GRUB
Linux Loader Grand Unified Bootloader
Detailed Boot Process
boot=/dev/hda overrides
prompt
timeout=50
message=/boot/message lilo [options]
lba32
default=linux stanza
image=/boot/vmlinuz-2.4.0-0.43.6
label=linux
initrd=/boot/initrd-2.4.0-0.43.6.img needs indent
read-only
root=/dev/hda5
other=/dev/hda1
label=dos
GRUB (Grand Unified Bootloader)
/boot/grub/menu.lst
Configuration file: /boot/grub/grub.conf
OR
overrides
default=0
timeout=30
grub
grub-install <device>
The init Program
/sbin/init PID 1
Runlevels
0 - shutdown
1 - single user (1, S, s, single)
2 - Debian – full X GUI
3 - full multi-user, console init <runlevel>
4 - undefined
5 - Red Hat – full X GUI
6 - reboot
The inittab File
/etc/inittab
id:runlevels:action:process
/etc/init.d/rc
Main script: /etc/rc.d/rc OR
/etc/init.d/rc?.d
Service scripts: /etc/rc.d/rc?.d
/etc/rc?.d
OR
? = runlevel number
chkconfig --list
chkconfig --level <levels> <script> (on | off)
chkconfig --add <script>