Custom Kernel and how Kernel works in Linux
This Guide walks your through how to install a custom kernel on Linux. I will tell you what is kernel and also I will go over performing this in a Debian-based system.
What is Linux Kernel?
Linux kernel is a free, open-source, monolithic,
modular, Unix-like operating system kernel. It is the main component of
the Linux operating system (OS) and is the core interface between the
computer’s hardware and its processes.
What the kernel does
The kernel is a computer program at the core of an operating system (OS). It is the part of the OS that loads first and remains in the main memory. The kernel connects the system hardware to the application software.
The kernel has 4 jobs:
- Memory management: Keep track of how much memory is used to store what, and where
- Process management: Determine which processes can use the central processing unit (CPU), when, and for how long
- Device drivers: Act as mediator/interpreter between the hardware and processes
- System calls and security: Receive requests for service from the processes
The Linux kernel is used by Linux distributions alongside GNU tools and libraries. This combination is sometimes referred to as GNU/Linux. Popular Linux distributions include Ubuntu, Fedora, and Arch Linux.Where the kernel fits within the OS
To put the kernel in context, you can think of a Linux machine as having 3 layers:
1. The hardware: The physical machine—the bottom or base of the system, made up of memory (RAM) and the processor or central processing unit (CPU), as well as input/output (I/O) devices such as storage, networking, and graphics. The CPU performs computations and reads from, and writes to, memory.
2. The Linux kernel: The core of the OS. (See? It’s right in the middle.) It’s software residing in memory that tells the CPU what to do.
3. User processes: These are the running programs that the kernel manages. User processes are what collectively make up user space. User processes are also known as just processes. The kernel also allows these processes and servers to communicate with each other (known as inter-process communication, or IPC).
Monolithic
The Linux kernel is monolithic, meaning the kernel handles all
hardware and driver operations. The entire operating system is virtually
working in kernel space.
Modular
The Linux kernel supports the insertion and removal at runtime of
loadable kernel modules. By keeping only the necessary modules in
kernel memory, the kernel’s memory footprint is reduced and its overall
performance is increased.
Custom kernels in Linux are based on the Zen project and have some workstation/desktop optimizations. They are not meant for server installations. These are meant for those using Linux Desktop and utilizing it for Gaming, Production, etc. and overall I don’t recommend using these. However, if you like to tinker and squeeze every bit of performance out of your kernel than you can proceed.
Custom Kernel on Ubuntu / Debian / Mint / Pop OS
Official Site https://liquorix.net/ for the Liquorix Kernel.
Vanilla Debian requires a bit of a long command to install the custom kernel, but works fine.
codename="$(find /etc/apt -type f -name '*.list' | xargs grep
-E '^deb' | awk '{print $3}' | grep -Eo '^[a-z]+' | sort | uniq -c |
sort -n | tail -n1 | grep -Eo '[a-z]+$')" && sudo apt-get update
&& sudo apt-get install apt-transport-https && echo -e
"deb http://liquorix.net/debian $codename maindeb-src
http://liquorix.net/debian $codename main# Mirrors:## Unit193 - France#
deb http://mirror.unit193.net/liquorix $codename main# deb-src
http://mirror.unit193.net/liquorix $codename main" | sudo tee
/etc/apt/sources.list.d/liquorix.list && curl
https://liquorix.net/linux-liquorix.pub | sudo apt-key add - &&
sudo apt-get update
Ubuntu, Linux Mint, and Pop OS! are quite a bit shorter for the install.
sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update
sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64
Comments
Post a Comment