Linux Booting Sequence
Linux Booting Sequence
The Linux boot process consists of several stages, each represented by a different component. The following list briefly summarizes the boot process and features all the major components involved.
- BIOS. After turning on the computer, the BIOS initializes the screen and keyboard and tests the main memory. Up to this stage, the machine does not access any mass storage media. Subsequently, the information about the current date, time, and the most important peripherals are loaded from the CMOS values. When the first hard disk and its geometry are recognized, the system control passes from the BIOS to the boot loader. If the BIOS supports network booting, it is also possible to configure a boot server that provides the boot loader. On x86 systems, PXE boot is needed. Other architectures commonly use the BOOTP protocol to get the boot loader.
- Boot Loader. The first physical 512-byte data sector of the first hard disk is loaded into the main memory and the boot loader that resides at the beginning of this sector takes over. The commands executed by the boot loader determine the remaining part of the boot process. Therefore, the first 512 bytes on the first hard disk are referred to as the Master Boot Record (MBR). The boot loader then passes control to the actual operating system
- Kernel and
initramfs. To pass system control, the boot loader loads both the Kernel and an initial RAM–based file system (initramfs) into memory. The contents of theinitramfscan be used by the Kernel directly.initramfscontains a small executable calledinitthat handles the mounting of the real root file system. If special hardware drivers are needed before the mass storage can be accessed, they must be ininitramfs. initoninitramfs. This program performs all actions needed to mount the proper root file system, like providing Kernel functionality for the needed file system and device drivers for mass storage controllers withudev. After the root file system has been found, it is checked for errors and mounted. If this is successful, theinitramfsis cleaned and theinitprogram on the root file system is executed.init.inithandles the actual booting of the system through several different levels providing different functionality.
Comments
Post a Comment