All commands run as root (su)
The steps I take when upgrading a kernel (or installing a dif kernel from what is the main kernel in Slackware at the moment):
First, I do run 5.12.x (5.11.x before this, as I had too many problems with 5.10.x)
I download the (4) packages needed from a mirror.
Run
installpkg kernel-* (from within the directory containing the kernel files).
Once completed, I run
/usr/shar/mkinitrd/mkinitrd_command_generator.sh
Yes, it is just a suggestion for what command to run, but I've done this for years and it has never failed so far.
Code:
mkinitrd -c -k 5.12.4 -f ext4 -r /dev/nvme0n1p2 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
This is what I get when using the mkinitrd_command_generator.sh script
Example:
If I have just installed kernel 5.12.5, I'd have to change that command line, by two things:
1. mkinitrd -c -k 5.12.4 changed to 5.12.5
2. /boot/initrd.gz to /boot/initrd-5.12.5.gz
So the suggested command (see code section above), is changed to this:
Code:
mkinitrd -c -k 5.12.5 -f ext4 -r /dev/nvme0n1p2 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd-5.12.5.gz
Next, I'll have to copy two files from /boot to /boot/efi/EFI/Slackware/
cp /boot/vmlinuz-generic-5.12.4 /boot/efi/EFI/Slackware/
cp /boot/initrd-5.12.5.gz /boot/efi/EFI/Slackware/
Finally:
edit the file /boot/efi/EFI/Slackware/elilo.conf (
nano /boot/efi/EFI/Slackware/elilo.conf as an example)
Either add a new section, or edit the previous (in my above example, 5.12.4) section
elilo.conf looks something like this:
Code:
chooser=simple
delay=5
timeout=5
default=generic1
#
image=vmlinuz-generic-5.12.4
label=generic1
initrd=initrd-5.12.4.gz
read-only
append="root=/dev/nvme0n1p2 vga=normal ro"
So what I have to edit here, is
image=vmlinuz-generic-5.12.4 to image=vmlinuz-generic-5.12.5
and
initrd=initrd-5.12.4.gz to initrd=initrd-5.12.5.gz
IF I am not updating a kernel as above, but adding a new kernel instead. I would have to add a new section to elilo.conf
Copy the default section, make sure you change the label=It's_Name AND make sure the default= points to that newly added sections label=
And yes, all of this can be done in konsole while in X (KDE in my case), it makes it easier as you can just copy/paste the mkinitrd command
(ctrl+shift+c to copy, ctrl+shift+v to paste into konsole, of course by first selecting the command line by using the mouse (or highlight it for another word)
Hope that helps a bit on your way