The bootloader will load the kernel. This could be GRUB or BCD for windows
Initrd - meant initial ram disk. Initramfs - initial ram file system.
It detects hawdware and loads drivers. Has all drivers so tjhe kernel image remains small and doesnt cause errors from conflicting drivers, and mount file system (it could be raid, netowork storage etc).
It is big 50MB and contains all drivers.
initrd - is compressed image. Zstandard
compressed data/ ASCII cpio archive
initramfs - uncompressed for older pcs.
It is called initrd
in many places although it is a initramfs
, particularly in boot loaders, as for them it is just a BLOB. The difference is made by the OS when it boots.
dmesg
systemd-analyze
systemd-analyze plot > plot.svg
Startup finished in 2.840s (kernel) + 11.378s (userspace) = 14.218s graphical.target reached after 11.364s in userspace
Userspace will be since systemd (init) starts to load services.
sudo systemctl disable/enable/start/stop NAME_OF_SERVICE
journalctl --disk-usage
journalctl --vacuum-size=50M
journalctl --verify (verify integrity)
/etc/systemd/journald.conf
SystemMaxUse=50M
Drivers
1. a device driver that provices software APIs to the kernel to interact with the hardawre and is os kernel specifici - windows/linux, or even different kernel versions, when some major APIs change.
Then there are in tree and out of tree drivers.
If the driver is open source it gets included into the kernel tree and gets re-compiled with every kernel version. If its not open source and its proprietary code, then you have to compile it with every new kernel you install.
If some older drivers depen on interfaces or APIs that get dropped out the kernel, then they will stop working, and you need to buy new hardware.
Kernel developers work for free and the hardware manufacturers only support old hardware for a few years until they release new hw. None of them will be willing to update the software of old hw.
To some extent this also happens with Windows, as some older hw might only have drivers up to a specific windows kernel versions, lets say only up to windows xp.
But if the driver is proprietary and out the tree, then it will stop working with new kernels - unless someone updates the code, which rerelly happens - so you need to buy new hardware if you want to use the new kernels.
DKMS - Dynamic Kernel Module Support - need to run as root, will automate the rebuild process of external driver modules with every kernel update.
You need to install it and configure it. --- sudo install dkms
Kernel modules are different drivers that can be used, if different functionality is required. NVIDIA might provide multiple drivers for different hw accelerated stuff, directx etc.
sudo apt install xserver-xorg-video-intell
This package provides the driver for the Intel i8xx and i9xx family of chipsets, including i810, i815, i830, i845, i855, i865, i915, i945 and i965 series chips.
In windows the driver includes both of them.
In linux it depends on the open-source license. So in most cases there is a open-source driver included in the kernel -tree and then you might need to get a firmware from the manufacturer.
Most of the time there is a package that it includes it, if not in the main dristo then in a separate repository like nonfree
Some hw some the firmware written into the chip's memory, and you can make a firmware upgrade, or some hardware use dynamic firmware that is loaded at boot time into the hardware, for ex wifi cards from intel load the firmware dynamic. to install it you use the package iwlwifi - intel wifi lan driver. Even though its called driver it actually contains a firmware
Most of the time kernel modules are drivers. But they can provide other functionality as well, usb stack, network stacks etc.
some example of packages with firmware:
Search here:
https://www.debian.org/distrib/packages#search_contents
Build kernel
============
sudo apt install gcc flex bison libncurses-dev libssl-dev
make xconfig
make menuconfig
/usr/src/linux/.config
make localyesconfig --- local loaded modules --- built-in kernel
make localmodconfig --- local loaded modules --- built as modules
make allnoconfig --- minimum kernel :)
+ [sata + ata + scsi] (ahci - lspci -k) si fs(ext4)
time make -j4 // j3 =j4
make modules
sudo make modules_install --- /usr/lib/modules/xx.xx.xx/
sudo make install --- /boot/
make mrproper- The make mrproper command cleans up any leftover files from previous kernel builds in your source directory. It also wipes out any . config files in your source directory. If you want to do a new clean build.
ADD all drivers loaded either built into kernel or as modules.
lsmod > /tmp/mylsmod
make LSMOD=/tmp/mylsmod localmodconfig
General Setup -> at the bottom - initrd imitramfs support
Need to have added as drivers in kernel ext4 and sata/ahci or nvme drivers
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
Linux Kernel Configuration
No rule to make target 'debian/certs/debian-uefi-certs.pem' scripts/config --disable SYSTEM_TRUSTED_KEYS scripts/config --disable SYSTEM_REVOCATION_KEYS
Hardware info
Check OpenCL drivers
You can run clinfo (sudo apt install clinfo ) and if it says 0 devices
sudo apt install intel-opencl-icd