Site Tools


wiki:debian-kernel-and-modules

Debian Kernel and Modules

The kernel is Debian's core OS. Modules are pluggable drivers and features.

Kernel Info

Show running kernel version:

uname -r
uname -a           # verbose

Check available kernel images:

dpkg -l | grep linux-image

Kernel Upgrade

Check for newer kernel:

sudo apt update
apt search linux-image

Install new kernel:

sudo apt install linux-image-amd64     # meta-package (recommended)

Then reboot:

sudo reboot

After reboot, verify:

uname -r

Remove old kernels (frees space):

sudo apt autoremove

Modules

Loadable kernel modules extend functionality without reboot. List loaded:

lsmod
lsmod | grep nvidia

Load module:

sudo modprobe e1000        # Ethernet driver

Unload module:

sudo rmmod e1000

Check module info:

modinfo e1000

Module Configuration

Persist module loading in /etc/modules-load.d/:

echo "ip_forward" | sudo tee /etc/modules-load.d/ip-forward.conf

Or /etc/modules (older):

echo "ip_forward" | sudo tee -a /etc/modules

Module options in /etc/modprobe.d/:

echo "options e1000 debug=1" | sudo tee /etc/modprobe.d/e1000.conf

Apply:

sudo update-initramfs -u

Boot Process

  1. BIOS/UEFI loads bootloader
  2. Bootloader (GRUB) loads kernel and initramfs
  3. initramfs is tiny filesystem with essential modules/tools
  4. Kernel extracts initramfs into RAM, mounts root, runs init
  5. systemd (PID 1) starts services

Bootloader config:

sudo nano /etc/default/grub
sudo update-grub

Rebuild initramfs (after major changes):

sudo update-initramfs -u -k all

Kernel Parameters

Set at boot via GRUB cmdline. Edit /etc/default/grub:

GRUB_CMDLINE_LINUX="quiet splash acpi_osi="

Apply:

sudo update-grub

View current parameters:

cat /proc/cmdline

Common Issues

  • Module not loading → check journalctl, verify hardware compatibility
  • Kernel panic → likely hardware or driver issue
  • High memory use → htop to identify processes
  • Old kernel booting → check GRUB default in /etc/default/grub
wiki/debian-kernel-and-modules.md · Last modified: by 127.0.0.1