Slackware 15 is getting a little long in the tooth, so I decided to upgrade to the latest kernel in the Slackware-current branch. This makes it easier because I can avoid many of the kernel compilation pain points. Here's what I did:
- Download the latest Slackware-current kernel source. I did it this way:
lftp -c "open https://slackware.osuosl.org/slackware64-current/source ; mirror k"
- Go into the "k" directory it created and untar the kernel source
- Copy the config you need from ../kernel-configs to the "k" directory and rename it .config
- Run "make olddefconfig"
- Run "make -j 12" Change the 12 to whatever cores you have available on your CPU. The command nproc will tell you.
- Go watch the baseball game while it compiles.
- Run "make modules_install"
- Copy the new kernel to the Slackware efi directory (replace the x.x.x with the kernel revision numbers):
cp arch/x86/boot/bzImage /boot/efi/EFI/Slackware/vmlinuz-x.x.x
- Back up the existing initrd,gz in the /boot directory
- Make a new initrd this way (replace the /dev/nvme0n1p2 with whatever your root partition is):
mkinitrd -c -k x.x.x -m ext4 -f ext4 -r /dev/nvme0n1p2
- I change the name of the new initrd,gz to initrd-x.x.x.gz to tell them apart.
- Copy the new initrd to the /boot/efi/EFI/Slackware directory
- Edit the elilo.conf file with the new kernel info
- Profit!