Linux
Distribution
Distributions
- Debian Family Systems (such as Ubuntu)
- SUSE Family Systems (such as openSUSE)
- Fedora Family Systems (such as CentOS)
Terminology
kernel | Between hardware and application |
---|---|
Distribution | Collection of software based on Linux-based OS |
boot loader | Program that boots the operating system such as GRUB, ISOLINUX |
service | Programs runs as a background process, httpd, nfsd, ftpd |
filesystem | Method for storing and organizing files such as ext3, FAT, XFS, NTFS (I/O) |
desktop environment | Graphical interface on top of OS such as GNOME, KDE, Xfce, Fluxbox |
X window systme | Graphical subsystem on the most of Linux |
command line | Interface to type command on OS |
Shell | Command line interpreter such as bash, tcsh, zsh |
The Process from power on to GUI
BIOS
the Basic Input/Output System(BIOS) initializes the hardware, including the screen and keyboard, and tests the main memory. This process is also called POST (Power On Self Test).
The BIOS software is stored on a ROM(Read-Only memory) chip on the motherboard. After this, the remainder of the boot process is handled by the operating system (OS. The CPU accesses the BIOS even before the operating system is loaded. The BIOS then checks all your hardware connections and locates all your devices.
The BIOS also is used after the computer has booted up. It acts as an intermediary between the CPU and the I/O (input/output) devices. Because of the BIOS, your programs and your operating system don't have to know exact details (like hardware addresses) about the I/O devices attached to your PC. When device details change, only the BIOS needs to be updated. You can make these changes by entering the BIOS when your system starts up. (https://techterms.com/definition/bios\
MRB (Master Boot Record)
It’s called Master Boot Record because the MBR is a special boot sector located at the beginning of a drive.
The size of the MBR is just 512 bytes. In this stage, the boot loader examines the partition table and finds a bootable partition. Once it finds a bootable partition, it then searches for the second stage boot loader e.g, GRUB, and loads it into RAM (Random Access Memory).
This sector contains a boot loader for the installed operating system and information about the drive’s logical partitions. A number of boot loaders exist for Linux; the most common ones are GRUB (for GRand Unified Boot loader) and ISOLINUX (for booting from removable media), and DAS U-Boot (for booting on embedded devices/appliances).
Most Linux boot loaders can present a user interface for choosing alternative options for booting Linux, and even other operating systems that might be installed.(https://www.quora.com/How-do-I-know-which-operating-system-support-GPT-or-MBR\.
Boot Loader
When booting Linux, the boot loader is responsible for loading the kernel image and the initial RAM disk or filesystem (which contains some critical files and device drivers needed to start the system) into memory. Kernels are almost always compressed, so its first job is to uncompress itself. After this, it will check and analyze the system hardware and initialize any hardware device drivers built into the kernel.
Initial RAM Disk
The boot loader loads both the kernel and an initial RAM–based file system (initramfs) into memory, so itcan be used directly by the kernel.
When the kernel is loaded in RAM, it immediately initializes and configures the computer’s memory and also configures all the hardware attached to the system. This includes all processors, I/O subsystems, storage devices, etc. The kernel also loads some necessary user space applications.
the kernel runs the /sbin/init
program. This then becomes the initial process, which then starts other processes to get the system running. Most other processes on the system trace their origin ultimately to init; the exceptions are the kernel processes, started by the kernel directly for managing internal operating system details. Besides starting the system, init is responsible for keeping the system running and for shutting it down cleanly.
FileSystem