flowchart LR A(Power On) --> B(BIOS/UEFI) B --> C(Detect Devices) C --> D(Choose Boot device) D --> E(Boot Loader) E --> F(Kernel) F --> G(Startup Scripts / Services) G --> H(User)
flowchart LR A(Power On) --> B(BIOS/UEFI) B --> C(Detect Devices) C --> D(Choose Boot device) D --> E(Boot Loader) E --> F(Kernel) F --> G(Startup Scripts / Services) G --> H(User)
The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally written in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU operating system, which was written to be a free replacement for Unix.
A modern computer operating system usually uses virtual memory to provide separate address spaces called user space and kernel space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour.
Kernel space is strictly reserved for running a privileged operating system kernel, kernel extensions, and most device drivers. In contrast, user space is the memory area where application software and some drivers execute, typically one address space per process.
flowchart TD A --> K subgraph U["User Space"] direction LR A(Process) end subgraph K[" Kernel Space"] direction LR R((System Calls)) R --> F(File System) R --> IPC(Inter Process Communication) R --> IO(IO & Device mgnt) end
BusyBox is a software suite that provides several Unix utilities in a single executable file. It runs in a variety of POSIX environments such as Linux, Android, and FreeBSD, although many of the tools it provides are designed to work with interfaces provided by the Linux kernel.
GNU cpio copies files into or out of a cpio or tar archive. The archive can be another file on the disk, a magnetic tape, or a pipe.
The “truncate” command extends or reduces the file size in Linux so that the user can delete or truncate the file’s content without having to set permissions and ownership.
mkfs is used to build a Linux file system on a device, usually a hard disk partition.
EXTLINUX is a new syslinux derivative, which boots from a Linux ext2/ext3 filesystem. It works the same way as SYSLINUX, with a few slight modifications. It is intended to simplify first-time installation of Linux, and for creation of rescue and other special-purpose boot disks.
The mount command allows users to mount, attach additional child file systems to a particular mount point on the currently accessible file system. The command passes the mount instructions to the kernel, which completes the operation.
QEMU is a free and open-source emulator. It emulates a computer’s processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems.
flowchart LR A(Boot) --> B(Kernel) B --> C(User Space)
flowchart LR A(initramfs) --> B(init file) B --> C(Start Shell)
flowchart LR subgraph initramfs direction LR A("BusyBox") --> B("/\n/bin") B --> C("init.cpio") D("/init") --> C end
flowchart LR subgraph initramfs direction LR A("init.cpio") --> B("boot.img") C("bzImage") --> B end
flowchart LR subgraph initramfs direction LR A("Qemu") --> AB("boot.img") AB --> B("bzImage (kernel)") B --> C("/init.cpio") C --> D("/init") D --> E("/bin/sh") end
Linux is Awesome