shrink the kernel
before you switch to the generic kernel, make sure you’re running the latest huge kernel available
assuming 15.0
slackpkg search kernel slackpkg upgrade kernel-firmware kernel-huge kernel-modules lilo reboot
you can now install that same version of the generic kernel and tune its boot-time modules
slackpkg install mkinitrd kernel-generic
and build the ramdisk
/usr/share/mkinitrd/mkinitrd_command_generator.sh
e.g.
mkinitrd -c -k 5.15.193 -f ext4 -r /dev/vda1 -m virtio_blk:virtio_pci_modern_dev:virtio_pci:virtio:virtio_balloon:virtio_ring:virtio_net:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz
vi /etc/lilo.conf
default = generic
image = /boot/vmlinuz-huge
label = huge
read-only
append = "ro console=ttyS0,115200n8 mitigations=off"
image = /boot/vmlinuz
label = generic
read-only
append = "ro console=ttyS0,115200n8 mitigations=off"
initrd = /boot/initrd.gz