My steps to upgrade Slackware kernel packages. I use only Slackware's. I've never rolled my own.
[ Note: before I upgrade kernel packages, I upgrade all other packages with slackpkg, making sure to deal with all needed conf files changes before moving to the next step - also a topic for another thread ]
Download and verify kernel-source, kernel-modules, kernel-huge, kernel-generic. Fake mirror example:
Code:
$ wget https://your.mirror.here/k/kernel-source-5.13.4-noarch-1.txz.asc https://your.mirror.here/k/kernel-source-5.13.4-noarch-1.txz https://your.mirror.herea/kernel-modules-5.13.4-x86_64-1.txz.asc https://your.mirror.herea/kernel-modules-5.13.4-x86_64-1.txz https://your.mirror.here/a/kernel-huge-5.13.4-x86_64-1.txz.asc https://your.mirror.here/a/kernel-huge-5.13.4-x86_64-1.txz https://your.mirror.here/a/kernel-generic-5.13.4-x86_64-1.txz.asc https://your.mirror.here/a/kernel-generic-5.13.4-x86_64-1.txz
I switch to a true login shell
Verify kernel-source, kernel-modules, kernel-huge, kernel-generic. Example:
Code:
# gpg --verify kernel-source-5.13.4-noarch-1.txz.asc kernel-source-5.13.4-noarch-1.txz
and so on for the modules, huge and generic
Install (not upgrade) in order of source, modules, huge, and generic. Example:
Code:
# installpkg kernel-source-5.13.4-noarch-1.txz kernel-modules-5.13.4-x86_64-1.txz kernel-huge-5.13.4-x86_64-1.txz kernel-generic-5.13.4-x86_64-1.txz
Upgrade in order of headers and firmware. Example:
Code:
# slackpkg upgrade-all
[ Example: choose kernel-headers-5.13.4-x86-1.txz ]
Code:
# slackpkg upgrade-all
[ Example: choose kernel-firmware-20210719_168452e-noarch-1.txz ]
Run mkinitrd generator script
Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh
Take the output of that, change the kernel version to the newly installed one, and run that
My example output, abbreviated (will show current kernel):
Code:
mkinitrd -c -k 5.13.3 -f ext4 -r /dev/sda# -m xhci-pci:...:crc32c_generic:ext4 -u -o /boot/initrd.gz
Copy that to the command line, change the kernel version to the newly installed one, and run that. My example, abbreviated:
Code:
# mkinitrd -c -k 5.13.4 -f ext4 -r /dev/sda# -m xhci-pci:...:crc32c_generic:ext4 -u -o /boot/initrd.gz
Last line of output: "Be sure to run lilo again if you use it." I use grub, and on my multi-boot computer, I let Xubuntu's grub control booting. Slackware's main entry is for /boot/vmlinuz; after the above actions, it is a symlink to the newly installed generic kernel as example vmlinuz -> vmlinuz-generic-5.13.4.
At this point, I have 4 kernels of two versions installed. Example: 5.13.4 generic and huge, and 5.13.3 generic and huge.
Reboot (if you pick the default Slackware grub entry, it will reboot into the new kernel.)
Once Slackware is back up running the new kernel, I check a few things to make sure it is working to my satisfaction. If it is, I remove old kernel packages.
Example:
Code:
.../var/log/packages# ls -l kern*
-rw-r--r-- 1 root root 99988 Jul 24 10:10 kernel-firmware-20210719_168452e-noarch-1
-rw-r--r-- 1 root root 972 Jul 20 18:39 kernel-generic-5.13.3-x86_64-1
-rw-r--r-- 1 root root 972 Jul 24 09:55 kernel-generic-5.13.4-x86_64-1
-rw-r--r-- 1 root root 30577 Jul 24 10:07 kernel-headers-5.13.4-x86-1
-rw-r--r-- 1 root root 968 Jul 20 18:39 kernel-huge-5.13.3-x86_64-1
-rw-r--r-- 1 root root 968 Jul 24 09:55 kernel-huge-5.13.4-x86_64-1
-rw-r--r-- 1 root root 319275 Jul 20 18:39 kernel-modules-5.13.3-x86_64-1
-rw-r--r-- 1 root root 319328 Jul 24 09:55 kernel-modules-5.13.4-x86_64-1
-rw-r--r-- 1 root root 4808942 Jul 20 18:38 kernel-source-5.13.3-noarch-1
-rw-r--r-- 1 root root 4809082 Jul 24 09:55 kernel-source-5.13.4-noarch-1
.../var/log/packages# removepkg *5.13.3*
...
.../var/log/packages# ls -l kern*
-rw-r--r-- 1 root root 99988 Jul 24 10:10 kernel-firmware-20210719_168452e-noarch-1
-rw-r--r-- 1 root root 972 Jul 24 09:55 kernel-generic-5.13.4-x86_64-1
-rw-r--r-- 1 root root 30577 Jul 24 10:07 kernel-headers-5.13.4-x86-1
-rw-r--r-- 1 root root 968 Jul 24 09:55 kernel-huge-5.13.4-x86_64-1
-rw-r--r-- 1 root root 319328 Jul 24 09:55 kernel-modules-5.13.4-x86_64-1
-rw-r--r-- 1 root root 4809082 Jul 24 09:55 kernel-source-5.13.4-noarch-1
The huge kernel is probably redundant, but I keep it around in case it comes in handy.
References
- SlackDocs
https://docs.slackware.com/slackware:beginners_guide
You should read it all, but at minimum for this topic, the sections "slackpkg", "Installing updates using slackpkg", and if switching to a generic kernel, "Switch to a generic kernel"
- man pages for slackpkg, installpkg, upgradepkg, removepkg
- SlackBuilds.org HowTo and FAQ
https://slackbuilds.org/howto/
Step 4 - Execute the SlackBuild Script (as root)
https://slackbuilds.org/faq/
11. Do I have to run the script as root?
- Lysander666's LQ blog on kernel upgrades
https://www.linuxquestions.org/quest...ackware-37876/
- Many LQ posts on kernels and kernel upgrading
If anyone has suggestions for a faster way to do this (aside from scripting some of this), or see a step I could leave out, or see anything important I might have missed, please speak up!
References postscript
Soon to be topical for some of us, read the SlackDocs section, "Upgrading Slackware to a New Release"
https://docs.slackware.com/howtos:sl...:systemupgrade
TKS