January 01, 2019
When you turn on your computer the system goes throgh different stages in order to initialize the hardware and then pass over the control to the OS (in particular this scheme is based on an x86 processor and linux).
The first step is carried out by the instructions placed in the motherboards ROM chip or flash memory, the BIOS firmware (
Basic Input Output System).
POST - power on self test takes place at this time: Ram, Screen, keyboard are checked,
Starting an x86 based linux system involves many steps.
When a computer is power on the
Basic Input Output System initializes the hardware, including screen and keyboard, and tests the main memory.
This process is also called POST ( Power on self test ).
The Bios software is stored in a rom chip on the motherboard.
After this the boot process is delegated to the OS.
-> Uefi Gpt or Mbr -> Boot loader (grub/ clover/ etc) After POST is completed the system control passes to the bootloader. The bootloader is usually stored on one of the harddisks in the system, either in the boot sector (for traditional BIOS/MBR) or the EFI (for more recent UEFI systems). Up to this stage the machine does not have access to any mass storage media. Thereafter, information on the date, time and the most important peripherics are loaded from the CMOS values (after a technology used to for the battery-powered memory storage which allows to keep track of the date and time even when it’s powered off). When booting linux the bootloader is responsabile for loading the kernel image and the initial ram disk/filesystem onto memory.
The bootloader has 2 distinct stages
-> kernel (linux os)
-> init ram fs The initramfs filesystem iamge contains programs and binary files that perform all actions needed to mount the proper root filesystem, like providing kernel functionality for the needed filesystem, and device drivers for mass storage controllers with a facility called udev (u for user, dev for device), which is responsible for figuring out which devices are present, locating the drivers they need to operate properly, and loading them. After the root filesystem is found it is checked for errors and mounted.
The mount program instructs the OS that a filesystem is ready for use, and associates it with a particular point in the overall hierarchy of the filesystem (the mount point). If this is successful, the initramfs is cleared from RAM and the init program on the root filesystem (/sbin/init) is executed.
-> /sbin/init Init handles the mounting and pivoting over to the final real root filesystem. If special hardware drivers are needed before the mass storage can be accessed, they must be in the initramfs image.
-> command shell using getty Near the end of the boot process, init starts a number of login prompts. After login you get a command line shell.
-> X -> DE
Francesco Calo developing on linux in La Spezia.
Just a programming journey.