This episode covers Alpine's kernel: the difference between linux-lts and linux-stable, version verification with uname, module management with modprobe and lsmod, the /etc/modules file, and boot parameters via GRUB and efibootmgr for safe kernel upgrades.

The kernel is the bridge between hardware and software, and Alpine provides kernel choices you can tailor to your needs. Episode 12 covers Alpine's two main kernels — linux-lts and linux-stable — along with module management and boot parameters.
Understanding the kernel isn't just for the curious: boot failures often come from a module that isn't loaded or a wrong kernel parameter. After this episode, you'll be able to swap kernels confidently and recover the system if booting goes wrong.
Alpine provides several kernel packages in its repositories:
linux-edge since Alpine 3.23. For new hardware or the latest features.Check the running kernel:
uname -r
uname -a
cat /etc/alpine-releaseThe uname -r output shows the kernel version. Compare it with the installed kernel packages:
apk info | grep '^linux-'
apk info -e linux-ltsapk info -e linux-lts shows whether the LTS kernel package is present on the system.
When a new Alpine release comes out, the kernel is updated along with it. Upgrade the kernel safely with:
apk update
apk upgrade
apk add linux-ltsAfter the kernel is installed, make sure the bootloader is updated and reboot:
update-grub
rebootThe uname -r output after rebooting should show the new kernel version. If booting fails, pick the old kernel from the GRUB menu as a fallback.
Kernel modules load hardware support dynamically. The main commands:
lsmod
modprobe wireguard
modprobe -r wireguard
modinfo wireguardExplanation:
lsmod shows the currently loaded modules.modprobe wireguard loads the module together with its dependencies.modprobe -r unloads a module.modinfo shows module metadata.To load a module automatically at boot, write its name in /etc/modules:
wireguard
nf_tablesEach line in /etc/modules is loaded at boot. Check the logs for modules that failed to load:
dmesg | grep -i error
tail -20 /var/log/messagesThe dmesg | grep -i error output shows kernel errors, including modules that failed to load.
Boot parameters are passed to the kernel at boot and can change system behavior, for example disabling the serial console or specifying the root partition. The default parameters are stored in /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet mitigations=auto"
GRUB_CMDLINE_LINUX="console=tty0"Apply the parameter changes:
update-grub
rebootFor UEFI systems, boot entries can be managed with efibootmgr:
efibootmgr
efibootmgr -v
efibootmgr --bootorder 0001,0000efibootmgr lists the boot entries, and efibootmgr --bootorder sets the boot order. If GRUB doesn't detect the kernel after an upgrade, regenerate the config:
grub-mkconfig -o /boot/grub/grub.cfgThe grub-mkconfig -o /boot/grub/grub.cfg command rewrites the GRUB menu from the current settings.
Warning
Always test a new kernel in a VM or non-production environment before applying it to an important server. A failed production boot can be avoided with a single test reboot beforehand.
Episode 12 covered Alpine's kernel management: the difference between linux-lts and linux-stable, version verification with uname, safe kernel upgrades, module management with modprobe and lsmod, the /etc/modules file, and boot parameters via GRUB and efibootmgr.
Key takeaways:
In the next episode, episode 13, we'll cover security hardening — the habit of regular updates with apk upgrade, strengthening SSH and the firewall, doas and umask policy, and using lynis and fail2ban for auditing and detection.