Before starting, ensure you have the necessary build tools installed. Slackware 15 includes most of these by default if you did a full installation. Verify the following are present:
gccandg++makebcflexbisonlibelf(part of theelfutilspackage)opensslandopenssl-develheadersperlncurses-devel(only needed if you plan to runmenuconfiglater)
Check for a package with pkgtool or simply try the build — missing tools will cause the build to fail with clear error messages.
Go to https://www.kernel.org and find the latest 6.18.x stable release. Download both the tarball and its PGP signature:
cd /usr/src
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.tar.xz
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.tar.signNote: Replace
6.18with the latest point release (e.g.,6.18.3) as shown on kernel.org.
The tarball on kernel.org is compressed; the .sign file covers the uncompressed tarball. Decompress first, then verify:
unxz linux-6.18.tar.xz
gpg --verify linux-6.18.tar.sign linux-6.18.tarIf GPG reports a missing key, fetch it:
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys <KEY_ID>The key ID will be shown in the GPG output. Trusted kernel signing keys belong to Linus Torvalds and Greg Kroah-Hartman.
tar xf linux-6.18.tar
cd linux-6.18Using your running kernel's config as the starting point is the safest approach. Slackware stores the config in /boot:
cp /boot/config-$(uname -r) .configIf that file does not exist, try extracting it from the running kernel (requires CONFIG_IKCONFIG_PROC=y in the old kernel):
zcat /proc/config.gz > .configRather than make oldconfig (which asks about every new option), use olddefconfig. This silently sets all new configuration options to their upstream default values — no prompting required:
make olddefconfigThis will update .config to account for any new options introduced since your previous kernel version while keeping all your existing settings intact.
Use all available CPU cores to speed up the build. The -j flag sets the number of parallel jobs:
make -j$(nproc)This step takes the most time. On a modern multi-core machine expect anywhere from a few minutes to half an hour depending on hardware.
make modules_installThis installs the compiled modules into /lib/modules/6.18.0/ (or whichever version string the kernel reports).
Copy the kernel image and the symbol map to /boot regardless of which bootloader you are using:
cp arch/x86/boot/bzImage /boot/vmlinuz-6.18
cp System.map /boot/System.map-6.18Optionally update the convenience symlinks that bootloader scripts expect:
ln -sf /boot/vmlinuz-6.18 /boot/vmlinuz
ln -sf /boot/System.map-6.18 /boot/System.mapSaving the config to /boot makes it easy to use as a base for future builds:
cp .config /boot/config-6.18Follow the section that matches your system. If you are unsure which bootloader you have, check whether your system booted in EFI mode:
ls /sys/firmware/efiIf that directory exists, your system is using EFI and you should follow the ELILO section. If the directory is absent, follow LILO.
Edit /etc/lilo.conf to add an entry for the new kernel. Add it alongside (not replacing) your existing entry so you can fall back if needed:
image = /boot/vmlinuz-6.18
root = /dev/sda1
label = Linux-6.18
read-only
Important: Adjust
root = /dev/sda1to match your actual root partition. Check your existing entries inlilo.conffor reference.
After editing, run LILO to write the new bootloader configuration:
liloLILO should print the names of each configured boot entry. If it exits cleanly, the bootloader has been updated. Continue to Step 11.
ELILO is the EFI counterpart to LILO and is what Slackware uses on EFI systems, including virtual machines configured with EFI firmware (e.g., VMware, VirtualBox, or QEMU/KVM with OVMF).
The EFI System Partition (ESP) is typically mounted at /boot/efi. Verify it is mounted:
mount | grep efiIf it is not mounted, mount it manually (adjust the device as needed — check lsblk or /etc/fstab for your ESP device):
mount /dev/sda1 /boot/efiSlackware's ELILO files live under the ESP at:
/boot/efi/EFI/Slackware/
Confirm this path exists:
ls /boot/efi/EFI/Slackware/You should see at minimum elilo.efi and elilo.conf.
ELILO needs the kernel image directly on the EFI partition:
cp /boot/vmlinuz-6.18 /boot/efi/EFI/Slackware/vmlinuz-6.18Open /boot/efi/EFI/Slackware/elilo.conf in a text editor and add a new entry for the 6.18 kernel. Add it alongside the existing entry, not replacing it:
image=vmlinuz-6.18
label=Linux-6.18
root=/dev/sda2
read-only
append="quiet"
A minimal elilo.conf with both the old and new entries might look like this:
prompt
timeout=50
default=Linux-6.18
image=vmlinuz-6.18
label=Linux-6.18
root=/dev/sda2
read-only
image=vmlinuz
label=Linux-previous
root=/dev/sda2
read-only
Important: Adjust
root=/dev/sda2to match your actual root partition. Theimage=path is relative to the directory containingelilo.confon the ESP — do not use a full filesystem path here.
eliloThis writes the updated configuration. If elilo is not in your PATH, it may be at /usr/sbin/elilo.
reboot- LILO systems: At the LILO prompt, select the
Linux-6.18entry (or wait for the default). - ELILO/EFI systems: The EFI firmware boot menu should present the
Linux-6.18label, or ELILO will boot the default entry after the timeout.
Once booted, verify the running kernel version:
uname -rThis should report 6.18.0 (or the point release you compiled).
- Missing kernel modules at boot: Check that
make modules_installcompleted without errors and that/lib/modules/6.18.0/exists with content. - LILO reports errors: Double-check partition names and file paths in
/etc/lilo.conf. Remember to re-runliloafter any edit. - ELILO: kernel not found: Ensure the kernel image was copied to the ESP (
/boot/efi/EFI/Slackware/) and that theimage=name inelilo.confmatches the copied filename exactly. - ELILO: ESP not mounted at boot: Add the ESP to
/etc/fstabso it mounts automatically. A typical fstab entry looks like:UUID=<esp-uuid> /boot/efi vfat defaults 0 2. Find the UUID withblkid. - Build fails on a header: Install the missing
-develpackage via Slackware's package tools or from the original installation media (slackpkgif configured, or manualinstallpkg). - Kernel panics at boot: Reboot and select your previous kernel entry from the LILO or ELILO menu to recover.