3.1 Linux Boot Process Flashcards
What are the four general stages for the boot process?
- BIOS
- Boot loader
- OS Kernel
- Init
When is the initrd image loaded into memory?
The initrd (Initial RAM Disk) image is loaded into memory while the secondary boot loader is loading.
What is the default initial program?
The default initial (init) program is /sbin/init.
Which component mounts the root partition?
The OS Kernel mounts the root partition.
What is the process ID of the initial program?
The process ID of the initial (init) program is 1.
Where is the primary boot loader located?
The primary boot loader code is located in the master boot record (MBR).
What are the stages in the Linux boot process?
- BIOS
- Boot loader
- OS Kernel
- Init
What happens in the BIOS stage of the Linux boot process?
In the BIOS stage, BIOS is loaded and the system hardware is identified.
What are the steps in the BIOS stage of the Linux boot process?
- Power is supplied to the processor. The processor is hard-coded to look at a special memory address for code to execute.
- This memory address contains a pointer or jump program which instructs the processor where to find the BIOS program.
- The processor loads the BIOS program. The first BIOS process to run is the power on self test (POST).
- If the POST is successful, the BIOS identifies other system devices.
- The BIOS then searches for a boot sector using the boot order specified in the CMOS.
What happens when the BIOS identifies system devices after POST?
- BIOS uses CMOS settings and information supplied by the devices themselves to identify and configure hardware devices.
- Plug and Play devices are allocated system resources.
- The system typically displays information about the keyboard, mouse, and IDE drives in the system.
- Following this summary, information about devices and system resources is displayed.
What happens in the Boot Loader stage of the Linux boot process?
During the boot loader stage, BIOS gives control to the boot loader program.
What are the steps in the Boot Loader stage of the Linux boot process?
- BIOS searches the boot sector which contains a Master Boot Record (MBR).
- BIOS loads the primary boot loader code from the MBR.
- The primary boot loader locates the OS kernel (itself or through a secondary boot loader)
- While the secondary boot loader is executing, a splash screen is commonly displayed and an optional initrd image is loaded into memory.
- With the images ready, the boot loader (primary or secondary) invokes the kernel image.
What are the two methods the primary boot loader uses to locate the OS kernel?
- It examines the partition table marked as bootable, and then loads the boot sector from that partition. This boot sector contains a secondary boot loader, which locates an OS kernel. Or,
- It locates an OS kernel directly without using a secondary boot loader.
What is the is the initrd image and how is it used?
The initrd or Initial RAM Disk image:
- Has root permissions and can be used to access the actual /root file system regardless of whether it exists on the local computer or an external device. Without the permissions, the computer could not access the file systems without being able to read information that only exists on those file systems.
- Is used to mount the actual file system and load the kernel into RAM.
What happens in the OS Kernel stage of the Linux boot process?
The Linux kernel takes over.