1- power on ….
2- Bios : a small program in EEPROM (Electrical Erasable Programmable Read Only Memory.
- check memory
- check for the availabiltity aboot devices
- loads Master Boot Record (MBR) of the first availale boot device .
MBR (master boot record) : it’s size 512 bytes
- 446 bytes for boot loaer .
- 64 bytes for partition table .
- 2 bytes magic number .
3- Boot Loader : after loades MBR , boot loader make its function .
function : check partition table and looks for a partition that is marked “active”.
Examples of boot loader : grub and lilo ,the most common now is grub (grand unified boot loader). Boot loader stored in MBR.
- called stage 1 , is usually stored in your MBR.
- called stage 1.5 , This stage is used to add filesystem capabilities to GRUB, so that GRUB is able to use regular filename references when loading configuration files, kernels and such, instead of disk block locations.
- called stage 2 , This gives a menu interface which allows you to boot your predefined operating systems, or enter commands to boot a non-predefined operating system.
kernal : When the user selects a Linux operating system in the boot loader, then the boot loader will
load the Linux kernel.
Kernal function :
- it detects all hardware .
- switches the cpu to multitasking and multiuser mode.
For more informations about kernal back to this topic linux kernal .
5- Init : started by the kernal , it decide runlevel mode .
- 0: halt
- 1: single user mode
- 2: multiuser without NFS
- 3: full multiuser mode
- 4: unused
- 5: multiuser with graphical login
- 6: reboot
we can moves from runlevel to another by runlevel command.
runlevel 6 the system will reboot.