Upgrading the Slackware Kernel Safely

Date: April 2, 2026

This page is my running guide and notes for upgrading the kernel on Slackware while keeping a known working boot option available.


What this guide covers


Before starting

Before doing anything, make sure you still have a known good kernel entry in GRUB. Do not remove your old working kernel until the new kernel has booted successfully.


Check current kernel

uname -r

This shows the kernel you are currently running.


Go to the kernel source directory

cd /usr/src/linux

Make sure this points to the source tree you actually want to build.


Use your current config

cp /boot/config-$(uname -r) .config
make olddefconfig

This uses your current kernel config as the base and updates it for the new source tree.


Build the kernel

make -j8
make modules_install

Adjust the -j8 value to match your system.


Copy kernel files into /boot

cp arch/x86/boot/bzImage /boot/vmlinuz-custom
cp System.map /boot/System.map-custom
cp .config /boot/config-custom

I prefer using unique names so I do not overwrite my known working files.


Create initrd if needed

mkinitrd_command_generator.sh -k 6.x.x

Use the output of the generator and create the initrd for the exact kernel version you built.


Update GRUB

grub-mkconfig -o /boot/grub/grub.cfg

After this, verify that the new kernel appears in the GRUB menu while the old one is still present.


Reboot and verify

Reboot into the new kernel, then confirm the system is running what you expected.

uname -r

Things I watch for after boot


Troubleshooting

Kernel boots but modules are missing

Make sure make modules_install completed successfully and that you booted the kernel that matches the installed modules.

System does not boot

Boot the older known working kernel from GRUB and review the kernel, initrd, and GRUB entries.

NVIDIA driver breaks

Rebuild or reinstall the NVIDIA driver for the new kernel if needed.

Wrong initrd

Regenerate the initrd for the exact kernel version you installed.


My notes

Add your own real-world notes here, such as:


Final thoughts

The safest approach is to treat kernel upgrades as reversible. Keep the old kernel, label files clearly, and confirm the new install works before cleaning anything up.

Back to home